hw3-sp11 - the modified networks, and the fingers at node...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE428/CS425/CSE424: Distributed Systems Spring 2011 Homework 3 Due: by 2 pm on 03/15/2011 Total points: 70 1. (20 points) Suggest a message-passing mutual exclusion algorithm in which nodes enter critical section in the happened-before order. That is, if a node A’s entry operation happens-before that of node B, then node A must enter critical section first. Explain why you believe that your algorithm is correct. Assume that the system is asynchronous, but there are no failures. Also assume that all channels are reliable and FIFO. If you believe that such an algorithm does not exist, explain why. 2. (15 points) Consider slide 4 in the set of slides used for Chord (distributed hash tables) in lecture 11. a. Pictorially show all the fingers at node with id 32. b. Determine where files with the following keys will be stored: 3, 43, 88, 100. c. Suppose that node with id 40 is added to the network. Show the fingers that need to be modified due to this addition (that is, the fingers that will point to node 40 in
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

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

Ask a homework question - tutors are online