Download presentation
Presentation is loading. Please wait.
Published byBeatrice Lee Modified over 9 years ago
1
1 Review Questions Define n variables, types of shared variables, message-passing, shared-memory system, system topology n program-counter/guarded command program syntax n global state, atomic action execution, fixpoint n synchronous, partially and fully synchronous execution n computation, execution semantics: interleaving, power-set n fairness, weak-fairness n prefix, suffix, property n causality, computation equivalence
2
2 Wave Algorithms n ring algorithm n tree algorithm n echo algorithm n polling algorithm
3
3 Wave Algorithms n Wave algorithm satisfies the following three properties u termination: each computation is finite u decision: each computation contains at least one decide event u dependence: in each computation each decide event is causally preceded by an event in each process n initiator (starter) - process that execution of its actions spontaneously n non-initiator(follower) - starts execution only when receives a message n wave algorithms differ in many respects, some features: u centralized (single-source) - one initiator; decentralized (multi- source) - multiple initiators u topology - ring, tree, clique, etc. u initial knowledge: F each process knows its own unique name F each process knows the names of its neighbors u number of decisions to occur in each process n usually wave algorithms exchange messages with no content - tokens
4
4 Ring algorithm n Processes are arranged in a unidirectional ring (each process has a sense of direction or knowledge of one dedicated neighbor) n initiator send message tok along the cycle u each process passes it on u when it returns to initiator, initiator decides n Theorem: ring algorithm is a wave algorithm
5
5 Tree algorithm n Operates on tree network (can work on spanning tree of arbitrary network) n no root, edges are n undirected (bi-directional) n leaves of tree initiate the algorithm n if a process has received a message from all neighbors but one (initially true for leaves), the process sends a message to the remaining neighbor. n If process gets messages from all neighbors - it decides n Excluding the forall statement how many processes can decide? What are these processes? n Why do we need forall statement? n How many messages are sent in the algorithm? n Is this a wave algorithm?
6
6 Polling algorithm n Works on cliques (complete networks) n one initiator (centralized) n how many processes decide? n How many messages are exchanged in the algorithm n what other topology can this algorithm be used in n Is this a wave algorithm?
7
7 Chang’s Echo algorithm n Works on networks of arbitrary topology n one initiator (centralized) n initiator sends messages to all neighbors n when non-initiator receives the first message it forwards it to all other neighbors, when it gets tokens from all other neighbors it replies back n how many processes decide? n How many messages are exchanged in the algorithm n Is this a wave algorithm?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.