CS307 assignments, Spring 2004

Things to hand in

Assignments are due at the beginning of class on the due date.

  1. Assigned Monday 3/29/04, due Friday 4/2/04. Please submit your source code via HSP.

    Write a Linux program that creates a child process, after which the following steps take place indefinitely.

    1. the parent asks the user to type a string
    2. the parent stores the string in memory shared with the child
    3. the parent sends a signal to the child
    4. the child prints a message making clear that it received the signal and the user's string
    5. the child sends a signal to the parent
    6. the parent prints a message making clear that it received the signal from the child
    7. go to step 1

    On Wednesday, I'll talk in class about shared memory. You can get started before then by leaving out step 2 and the "user's string" part of step 4.

    You'll need to use several system calls, including (but not necessarily limited to) fork, signal, kill, and shmget.

  2. Assigned 4/6/04, due Monday 4/11/04. Do problems 3, 4, 6, and 8 from Chapter 6 and problems 2, 8, and 24 from Chapter 7.

  3. Assigned 4/6/04, due Monday 4/19/04. Write a command shell that supports >, <, |, and &. Include a readme.txt that specifies the limitations, if any, of your shell (for example, if you require the full path of the command to be typed, or if you have not implemented <). You may work in pairs for this assignment, if you wish.

  4. Assigned 4/9/04. For each of three major topics (processes, memory management, and files systems), I am going to ask pairs of students to investigate how some important operating systems solve certain problems. We lined up the first presentation schedule in class on 4/9.

    On Wednesday 4/14 and Friday 4/16, the pairs will give approximately 10-minute presentations on the following questions.

  5. Assigned 4/20/04, due Monday 4/25/04. Do problems 8.3, 6, 13, 14; 9.5, 7, 16; and 10.5, 6, 10, 11 (for six frames), 18.

  6. Assigned 4/28/04, due Friday 4/30/04 (nothing to hand in--just do it). Follow the instructions on how to add a system call to Linux, as discussed in class. Use one of the four machines in the far corner of CMC304. You'll need to login as root with the password given in class.

  7. Assigned 5/10/04. Prepare presentations on the Linux functions/syscalls (open/close, read/write, malloc, fork/vfork, exec, signal/kill). Presentations will by on 5/14 and 5/16, as scheduled in class.

  8. Assigned 5/18/04 due Monday 5/24/04. Hand in the problems on paper, and the program via HSP.

  9. Assigned 5/24/04, due Monday, 5/31/04. Add the following to the kernel:

    Test the new system call by collecting enough data to determine the average quantum length over a period of ten seconds. Try this under varying conditions (e.g. minimal load, with even X-windows shut off, or heavy load, with some long CPU-intensive program running).

    Hand in hard copies of all the code you add to the kernel, along with the program you write to test your new system call. Also, hand in a summary and brief (one or two paragraphs) discussion of your quantum length observations.

Reading

  1. 3/29/04. Look at the Unix manual pages for the system calls read(), write(), fork(), exec(), signal(), getpid(), getppid(), wait(), and kill(). For system calls like kill() for which there is also a Unix command with the same name, you'll need to specify the manual section number to get the documentation you need. For example, to get the manual page for kill(), you type "man 2 kill".

  2. 3/31/04. Read Chapters 1-3 of Silberschatz, Galvin, and Gagne.

  3. 3/31/04. Read Chapters 4 and 7.

  4. 4/5/04. Read Chapter 6.

  5. 4/7/04. Read Chapter 5.

  6. 4/12/04. Read Chapter 8.

  7. 4/26/04. Read Chapters 9-10.

  8. 5/10/04. Read Chapters 11-12.





Jeff Ondich, Department of Mathematics and Computer Science, Carleton College, Northfield, MN 55057, (507) 646-4364, jondich@carleton.edu