9 September, 2010
While previous lecture focuses on mutual exclusion, this second lecture on inter-process communication (IPC) focuses on synchronization among processes. You will learn about using semaphore to solve the producer-consumer problem and dining philosopher problem. We will end the lecture on threads programming in C.
Having a hardcopy of slides during lecture would be helpful. Be prepare to take notes during lecture. Demo code will be shown during lecture and posted after the class along with screencast.
Download Slides: PDF
- Section 2.3.5 Semaphore
- Section 2.3.6 Mutexes
- Section 2.5.1 The Dining Philosophers Problem
Related Wikipedia entries are listed below. These are for students who are keen to go beyond what is covered in CS2106. Read the articles with a critical mind since Wikipedia is editable by anyone.
Here is a nice tutorial on phtread programming by Blaise Barney of Lowrence Livermore National Laboratory.