Professional Documents
Culture Documents
Master/Slave Agreement
Egon Brger
Eventually the master becomes idle, with all slaves either idle too or executing the accepted job.
Egon Brger: Master/Slave Agreement 2
Slaves:
asked: {true,false} recording whether a job request has been launched by the master to the slave answer : {accept,refuse,undef} recording whether a job request has been acceped by the slave ctl_state:{idle, waitingForOrder, busy}
Answers Arrived
OrderOr Cancel
OrderOrCancel clear answer if for some s Slave s.answer = refuse then order:=cancel else order:=job
idle
Answer
Order Arrived
order = job no
yes
busy
done
Reference
W.Reisig: Elements of Distributed Algorithms Springer-Verlag 1998
See the definition of a Petri net in Section 30 (Fig.30.1) and a detailed correctness proof in Section 75
E. Brger, R. Strk: Abstract State Machines. A Method for High-Level System Design and Analysis Springer-Verlag 2003, see http://www.di.unipi.it/AsmBook
See Chapter 6.1