CSL373/CS333N: Assignment 1 on Process control and IPC

Background reading

  1. Carefully read the following man pages: signal, ualarm,umask, sigprocmask, gettimeofday, wait, exec, fork, pipe,open, ipc, clone, msgctcl, msgsnd, msgrcf,rand, srand48. Unix Network Programming by W. Richard Stevens is an excellent source for studying this stuff. You should also look at The Linux Programmer's Guide
  2. Read from the OS books the sections that deal with: CPU scheduling, processes, threads, IPC.
  3. Read the linux pthreads tutorial. Do not download the package - pthreads is built in to glibc.

Process Applications

  1. Expand the hare and turtle process descriptions and implement IPC solutions by defining cooperating processes.
  2. First use fork() and execve() to create the processes and develop complete applications using the following LINUX IPC (message passing) mechanisms separately: (i) pipes (ii) FIFO files and (iii) message queues.
  3. Develop the same applications using Linux pthreads (shared memory).

Note:

  1. To be done in groups of two.
  2. Exchange your tests with others.
  3. The last date of submission of solutions using pipes, FIFOs and message Qs is Jan 20 (strict). Click here to submit.
    The last date for the pthreads solution will be announced later.

Subhashis Banerjee / Dept. Computer Science and Engineering / IIT Delhi / Hauz Khas/ New Delhi 110016 / suban@cse.iitd.ernet.in