|
CSL373/CS333N: Assignment 2 on Process control and IPC
Background reading
- Read from the OS books the sections (bed time stories) that
deal with: CPU scheduling, processes, threads, IPC.
Read from Unix Network Programming by W. Richard
the sections on semaphores and shared memory.
Also look at
The Linux Programmer's Guide and read the corresponding man pages.
- The following are good sources for pthreads (thanks to Parag for
unearthing them).
- http://pauillac.inria.fr/~xleroy/linuxthreads/.
- http://www.llnl.gov/computing/tutorials/workshops/workshop/pthreads/MAIN.html
- http://www.cs.nmsu.edu/~jcook/Tools/pthreads/pthreads.html
- http://phoenix.liunet.edu/~mdevi/pthread/Main.htm
- http://dis.cs.umass.edu/~wagner/threads_html/tutorial.html (this is the one Parag recommends)
- The new edition of Stevens' Book.
Do not download the package - pthreads is built in to glibc.
Process Applications
Implement one of the following using pthreads and semaphores
you may either use linux posix compliant semaphores, or use semaphores built
using pthreads mutex locks - see Appendix A of the last pthreads tutorial above.
Make sure that your solution is free of deadlock and
starvation.
- hare and turtle
- Dining philosophers.
Note:
- To be done in groups of two.
- Exchange your tests with others.
- The last date of submission of solutions
is Jan 25 (strict). Click here to submit.
Subhashis Banerjee / Dept. Computer Science and Engineering / IIT Delhi /
Hauz Khas/ New Delhi 110016 / suban@cse.iitd.ernet.in
|