This preview shows page 1. Sign up to view the full content.
Unformatted text preview: the modified networks, and the fingers at node 40). 3. (15 points) Consider the following code to be executed by every processor in a shared memory system. Initially, shared memory variable V equals 0 <Entry>: 1: wait until V=0 2: V := V + 1 3: wait until V < 2 <Critical Section> <Exit>: 4: V := 0 Will the above code for Entry and Exit ensure mutual exclusion? Explain your answer . Assume that no failures occur, and that the system is asynchronous. 4. (10 points) In the ring-based leader election algorithm discussed in class, the node with the largest identifier (or attribute) becomes the leader. How can this algorithm be modified such that the probability that a given node will become a leader is identical for all nodes. Assume that no failures occur. 5. (10 points) This question is based on material to be covered in the lecture on March 3, 2011. Briefly discuss two differences between shared memory in a bus-based shared memory multiprocessor and a distributed shared memory...
View Full Document
- Spring '08