----------------------------------------------------------------------------- Mohamed G. Gouda CS 356 Spring 2009 Quiz 1 ----------------------------------------------------------------------------- Consider a protocol involving the following three processes process p var ready : boolean {Initially true} begin ready --> ready := false; send rqst to q [] ready --> ready := false; send rqst to r [] rcv rply from q --> ready := true [] rcv rply from r --> ready := true end process q begin rcv rqst from p --> send rply to p end process r begin rcv rqst from p --> send rply to p end Show the state-transition diagram for this protocol. ------------------------------------------------------------------------------- Student Name: Student EID : ------------------------------------------------------------------------------- Solution: Just show three states here, others are similar. initial state: S0 S0 1p/ \2p / \ S1 S2 S0 = ready ^ ch.p.q={} ^ ch.p.r={} ^ ch.q.p={} ^ ch.r.p={} S1 = ~ready ^ ch.p.q={rqst} ^ ch.p.r={} ^ ch.q.p={} ^ ch.r.p={} S2 = ~ready ^ ch.p.q={} ^ ch.p.r={rqst} ^ ch.q.p={} ^ ch.r.p={}