– Operating Systems Homework Assignment 1 Spring 2017 – Prof. Sventek Due at 5:00pm on Thursday, 20 April 2017 All questions must be answered by you without outside assistance. Submission is via Canvas. You may submit either a plain text (.txt) or a PDF (.pdf) file. Succinct, concise answers to the questions are preferable to long, rambling ones. Textbook Questions (30 points) 1. OSC 2.18: What are the two models of inter-process communication? What are the strengths and weaknesses of the two approaches? (6 points) 2. OSC 2.19: Why is the separation of mechanism and policy desirable? (4 points) 3. OSC 3.9: Describe the actions taken by a kernel to context-switch between processes? (4 points) 4. OSC 3.18: What are the benefits and the disadvantages of each of the following? Consider both the system level and the programmer level. (16 points) a. Synchronous and asynchronous communication b. Automatic and explicit buffering c. Send by copy and send by reference d. Fixed-sizes and variable-sized messages Process Analysis (20 points) Suppose you want to find out as much as you can about a running process, one where you do not have access to the source code. Describe a procedure that uses files in the Linux proc filesystem1 to extract as much information about the process as you can. I am particularly interested in information about: the command line that caused the process to come into existence, which executable image is the process running, what aspects of the process’s status can you report, and how much I/O has the process performed; also of interest is the process’s memory usage. You should be able to apply this to any of your currently executing processes. For instance, an experiment may begin something like this: % sleep 600&  1363 . . . You can cd to /proc/1363 and run ls, where you will see several files and directories. Some of these files contain relevant information. Explain which piece of information each step of your procedure is designed to supply, and how it relates to the program, process, and operating system.
Assignment 1: Operating Systems