(Latest Revision: 10/17/2000)
Week 07 Notes for CS 3750 -- Fall 2000
Tuesday, October 17
- Take Roll.
- Announcement(s)
- I'm handing back the Exams
- Grades are posted in the web space.
- I will assign program #1 soon.
- I assigned homework #4
- Discuss Deadlock avoidance and the banker's
algorithm
- Discuss chapter 6 material up to coverage of
semaphores
Thursday, October 19
- Take Roll.
- Announcement(s)
- I posted the program #1 assignment:
concurrent bubble sort.
- Read the programming assignment and we will discuss
it next time.
- Examine the safety algorithm pseudo-code in file
"bankersAlg". Note that the safety algorithm can
be viewed as a test to see if the system will be
deadlocked if all processes immediately request
their current "needs."
- Look at the specifics of one safety check in file
bankersAlgEg.
- Examine the banker's algorithm and note the role
played by the safety algorithm.
- Discuss chapter 6 material up to coverage of
semaphores
- Bakery Algorithm: Generalizes the 2-process
critical section problem solution to n-processes.
- Hardware support allows simplifying the code for
the solution to the n-process critical section
problem: The solution using the Test-and-Set
instruction.
- Semaphores improve the previous methods by making
the user-code extremely simple and by using
block/wakeup instead of busy waiting.
- Look at the way file semsFromTSL illustrates the
implementation of counting semaphores. Understand
how implementation of the atomic semaphore
operations is another critical section problem
which is solved by a previously-studied "software
method." Notice how some busy-waiting is still
involved in the implementation of semaphores, but
only a small amount compared to what might occur if
we used something like the Bakery Algorithm to wait
to enter a long critical section of code.
- Go over the rest of the slides for chapter 6
quickly, making some points. What is the purpose
of each new primitive?