CS4411 Reading List: Week 6

Course Material
Slides used in class are available in the common directory with filenames 05-Synchronization.pdf.
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 the following synchronization primitives and thier implementation.
  • Understand the "too much milk" problem and study the possible "solutions".
  • Prove the "correct" solution by showing that there will be one of ALice and Bob will buy milk but not both. Try to prove this as accurate and correct as possible.
  • Understand the concept and use of condition variable.
  • Make sure you know and understand the differences between the Hoare type and Mesa type.
  • Understand the implementation of lock::acquire() and lock::release().
  • Understand the concept and use of SpinLock.
  • Understand the implementation of semaphores, in particular the four examples.
  • Make sure you understand the claim of "semaphores are considered harmful".
  • The textbook authors promote the use of locks and condition variables as a replacement of semaphores.
  • Now, compare the "locks + condition variables" technique and the classical version of monitors covered in CS3331 Concurrent Computing. What is your conclusion?
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.