CS4411 Reading List: Week 5

Course Material
Slides used in class are available in the common directory with filenames 04-Concurrency.pdf, Unix-Signal.pdf and Coroutines.pdf
Study Unix Multiprocess Programming
If you wish to print these slides, print them double-sided and print as many slides as possible on the same page. Let us save a tree!

Programming Material
None for this week. But, you should start study the OS/161 source code.

Homework Assignment
Thouroghly understand thread creation, termination and join.
  • Why do we need a stub/wrap when a thread is created?
  • What would happen when a system allows the thread itself to deallocate its state?
  • Make sure you know how Unix signal handlers are used.
  • Coroutines.pdf has a simple implementation of user-level threads using setjmp() and longjmp(). Make sure you know the mechanism of creationg, terminating, joining and yielding.
  • This system is mtuThread. There is a problem in THREAD_INIT(). This function shows three implementations for Sun Solaris, Windows and Linux. The Linux version is based on an old version of gcc; however, newer versions of gcc rejects the way of setting the stack pointer, base pointer and program counter to jump buffer. Try to understand the problem and find a solution if possible.
  • mtuThread is in the common directory with name mtuThread.tar.gz. A short discussion of this simple system is available here. However, the Linux system dummy1.csl.mtu.edu is no more available.
  • ithreads_distribution.tar.gz is the package of Cthreads, which is available here.
We do not collect your practice work; but, similar problems will appear in quizzes and exams in the future. Note that I will not make any announcement in class for these short quizzes. In other word, short quizzes may take place at any time as long as I see it is appropriate.