Principles of Operating Systems

CMSC 421-04 - Spring 2016


Homework 4

Chapters 7-8

50 points total

Due by 11:59PM EDT on Tuesday, May 10, 2016


Part I

40 points

Please provide written responses to the following questions. Each response should be about 5-7 sentences in length. Each question is worth 10 points.

  1. Describe Return Oriented Programming and why it is used in exploits of modern systems.
  2. Describe what an inode is in a filesystem. Give several examples of data that is stored in an inode for a file.
  3. Compare and contrast the tree-based and general graph-based directory structures that were discussed in class. Give several pros and cons of each.
  4. Describe the principle of least privilege. Describe how the UNIX model of protection works and discuss how it enforces the principle of least privilege on systems.

You must submit a PDF file of the answers to these questions on the Homework 4 assignment on Blackboard. You may prepare your responses in any word processing application of your choosing, but you must submit a PDF file. Do not submit Microsoft Word/Apple Pages/LibreOffice/OpenOffice.org documents with your responses. You must convert to a PDF file before submitting or you will lose points.

Part II

10 points

Complete the following programming assigment and submit your code using the GitHub repository that you will have created for this assignment. This assignment must be completed in the C programming language (you can choose to use C89/C90/ANSI-C, C99, or C11 as you see fit).

In this assignment, you will be augmenting your shell from Homeworks 1 - 3 with one new feature. You will be adding the ability to run a program in the background using an & character, just as most normal shells provide. This functionality should work both in interactive and script-based modes. In a script-based mode, you should ensure that exiting your shell does not kill the child programs that might still be running in the background.

Any & characters for backgrounding applications will be given at the end of a line (as the last character before the newline). Any other & characters on a command given should be treated as they normally would for wherever they are located (i.e, in a program name or in an argument).

Your shell program is not allowed to use any external libraries other than the system's C library and the files provided in this assignment. Do not try to use libraries like Readline. You will lose points for using external libraries to implement shell functionality!

When submitting your shell program, please be sure to include the source code of the shell program (in one or more C source code files), as well as a Makefile that can be used to build the shell. Your shell must be able to be built and run on a VM as has been set up for this course in your projects. If you use my utility functions, make sure to include those files as well.

As this should be an extension of your earlier homework 1-3 shell, you should be using the same directory and git repository for it. To submit your code, you should do the following:

git add your_updated_and_added_files_go_here
git commit
git push -u origin master

git tag hw4
git push origin --tags

Last modified Tuesday, 01-Sep-2020 18:43:36 EDT