HOMEWORK 6 (COMMENTS AND COMMON MISTAKES) << Problem 3 >> o The algorithm does NOT schedule processes according to the order in which they entered the "testing" section. o When explaining a property of an algorithm, try to get at the core idea(s). The core idea in Lamport's Bakery algorithm is that processes get ticket numbers which are non-decreasing in value but need not be unique. Ties are broken by choosing the lowest numbered proccess id. << Problems 4 and 5 >> o Ambiguous Receiver Many solutions contained something like the following to indicate to a customer that it's service was finished: Teller Process Customer Process -------------- ---------------- Signal(tDone); -------> Wait(tDone); But because there are two tellers, it is possible that a customer reacts to the tDone signal from the incorrect teller. The solution is to have each teller use a different semaphore: Teller Process Customer Process ----------------- --------------------- Signal(tDone[i]); ---> Wait(tDone[myTeller); o Many solutions did not explain the purpose of each semaphore. o Showing the signal-wait pairings would help in exposing dangling signals and mutual exclusion problems.