

Concurrent Programming, Autumn 2007, HW 5
These will be covered in practise session during the week 48, 26-31.11.2007.- Exercise 6.6 from text book.
- Look at the Algorithm 6.21 in text book (p. 144).
Notice the typo in algorithm.
- Show that readers have priority over writers.
- Will the algorithm work, if all three semaphores would be busy-wait semaphores instead of the usual suspend-wait semaphores? Under which conditions one should/should not use busy-wait semaphores instead of the usual suspend-wait semaphores?
- Modify the algorithm so that writers have priority over readers. Why would one want to do it this way?
- Modify the algorithm so that readers and writers have same priority. Why would one want to do it this way?
- Redo problem 1 in homework set 4 (BACI PlusMinus program) with monitor.
- Look at the Algorithm 7.3 in text book (p. 152). Notice the typo in algorithm.
- What significant differences does algorithm 7.3 have when compared to the multiple producers/consumers solution given in lectures (lecture 6, slide 16; Andrews, Fig 4.5)? Which one is better/worse and why?
- What does the concept monitor signalling semantics mean?
- Algorithm 7.3 is based on IRR signaling semantics. Give a scenario where the algortihm does not work properly if signalling semantics E=S=W were be used.
- How should one modify the algorithm 7.3 for E=S=W monitor signalling semantics?
- Redo problem 4 in homework set 4 (narrow bridge) with semaphores so that waiting cars will wait in private semaphores.
- Redo problem 4 in homework set 4 (narrow bridge) with monitor.
Teemu Kerola 16.11.2007 12:43