Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slides for Chapter 12: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson.

Similar presentations


Presentation on theme: "Slides for Chapter 12: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson."— Presentation transcript:

1 Slides for Chapter 12: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education 2005

2 Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 12.1 A network partition

3 Agreement in Pepperland (p.51) zConsider an army in Pepperland: Apples and Oranges: two groups are located on the hills zBlue Meanies are invader. Now located in the valley. zApple and Orange have to decide when to attack. zThey exchange messages on their strength: number of attack items (personal, machinery etc). zThey reach a consensus on who will attack first based on strength. zThen attack message is sent from stronger team to weaker team. The message delay {min… max} zApple (say) send the attack message, waits for min minutes; then starts attack; Other team is supposed to wait for 1 min after it receives attack msg; zIdeal guarantee: Orange will start attack no more than {max-min+1} minutes. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

4 Consensus in the presence of failure (p.54) zHow do you detect failure? What if the messenger from Apple to Orange is captured? zHow does Orange know if Apple has been defeated? zImpossibility in reaching agreement in the presence of failures: to surrender or to attack? zIf the messenger is captured there is way to achieve agreement. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

5 Consensus in Space Mission Launches zMission critical applications zSet of divisions each in charge of a module of the (shuttle) mission zThey have to agree or come to a consensus to launch (attack in Pepperland) or abort (surrender in Pepperland). zIn case of failure of message, consensus is reached to abort the mission. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

6 Shuttle Story z“I had a friend who was one of the programmers who worked on the Shuttle guidance system, which used three computers in parallel, and operated under a consensus model. If two computers agreed on a decision, the third would remain quiescent. If they disagreed, however, the third computer would jump in to cast a tie- breaking vote. I asked what would happen if the three computers came up with three different answers, and he shook his head. I asked what would happen if one of those computers dropped out, and he said the other two would end up dead-locked.” Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005

7 Figure 12.2 Server managing a mutual exclusion token for a set of processes Server 1. Request token Queue of requests 2. Release token 3. Grant token 4 2 p 4 p 3 p 2 p 1

8 Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 12.3 A ring of processes transferring a mutual exclusion token

9 Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 12.4 Ricart and Agrawala’s algorithm On initialization state := RELEASED; To enter the section state := WANTED; Multicast request to all processes;request processing deferred here T := request’s timestamp; Wait until (number of replies received = (N – 1)); state := HELD; On receipt of a request at p j (i ≠ j) if (state = HELD or (state = WANTED and (T, p j ) < (T i, p i ))) then queue request from p i without replying; else reply immediately to p i ; end if To exit the critical section state := RELEASED; reply to any queued requests;

10 Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 12.17 P.500 Consensus for three processes

11 Failure Management in Web-services world – WS- membership zSee the next presentation Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005


Download ppt "Slides for Chapter 12: Coordination and Agreement From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson."

Similar presentations


Ads by Google