CS 307 Assignments

Things to hand in

  1. Assigned 3/27/00, due Friday 3/31/00. Please submit your source code via HSP. You may work with a partner.

    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 limited to) fork, signal, kill, and shmget.

  2. Assigned 4/3/00, presentations starting Friday 4/7/00 (randomly chosen order), possibly continuing on Monday. Your group will give a 10-minute presentation on:

  3. Assigned 4/10/00, due Friday 4/14/00, on paper. Do problems 5, 8, 15, 20, 21, 22, 25, and 26 from Chapter 2 of Tanenbaum.

  4. Assigned 4/10/00, due Wednesday 4/19/00, on paper. Do problems 3, 5, 11, 12, 13, 19, and 25 from Chapter 3 of Tanenbaum.

  5. Assigned 4/21/00, due Friday 4/28/00. Some problems

Suggested Reading

  1. 3/27/00. Check out 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's 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".

    Read Chapter 1 of Tanenbaum.

  2. 4/7/00. Read Chapter 2 of Tanenbaum.
  3. 4/13/00. Read Chapter 3 of Tanenbaum.




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