Presentation is loading. Please wait.

Presentation is loading. Please wait.

PROTOCOL CORRECTNESS Tutorial 3 Theoretical

Similar presentations


Presentation on theme: "PROTOCOL CORRECTNESS Tutorial 3 Theoretical"— Presentation transcript:

1 PROTOCOL CORRECTNESS Tutorial 3 Theoretical
Based on Lecture 4 Protocol Correctness (Dr. Amr Talaat) Eng. Ahmed Badr

2 Reachability Analysis
P1 P2 Sender’s state C1’s content C1 Reachability Analysis C2 C2’s content Recv’s state Global state exploration process that starts from the initial global state and recursively explores all possible transitions that lead to new global states. Global state: pair of <S,C> where S = (S1, S2, S3, …., Sn) Si – current state of process Pi. C = current content of the channels Cij linking the processes Pi & Pj Initial global state: all processes are in their initial states and all channels are empty.

3 Reachability Analysis Process
Start with initial global state. Fire all possible transitions to generate global states. All dead lock & unspecified reception errors will be captured and marked as individual global state. By examining the number of messages in the channels, buffer size is decided for the protocol. Detect non-executable states & transitions by marking these states that are touched and transitions that are fired during the reachability analysis.

4 Safety and Liveness properties
Safety property Simultaneous access will never be granted to both A&B Nothing bad will never happen Liveness property Given light will be turned on sometime in the future. Something good will eventually happen.

5 Unspecified Reception
There exist a message in the queue, there exist a reception transition but the message in the queue is different from the message expected by the reception transition. The network can not progress further. The received message is different from the expected message by the receiver.

6 Non-executable states and transitions
If the State will never be executed or become the current state. It is called non-executable state.

7 Dead Lock Both machines are at receiving states and channels are empty. The network can not progress further. Receiving state is a state where all its outgoing transition are all receiving transition. It can not move without message in its incoming channel.

8 Live Lock A system is in the live-lock (dynamic deadlock) if the processes are exchanging messages that are not useful for providing the service and so not making "effective progress". Both sending non-effective messages.

9 Solution Steps Start with
S0 ≅ initial state of each process E ≅ Channel is empty Start with Start with machine which fires output (This may produce more than one path (direction)). [ assume for example it will be P1] Empty the channel & use the output of it to make the other machine [P2] go to next state, but don’t make it output any thing. In the current state of [P2] put on the channel the new output and go to next state. E S0

10 Solution Steps Cont. Empty the channel and use the output of it to make the other machine [P1] go to the next state, but don’t make it output anything. After finishing you may have one of the following: Node already exits in the tree Node corresponds to deadlock Non-specified reception case Note: A machine can output several times without waiting the other to receive, in this case you are required to calculate the buffer size of the receiver.

11 Problem 1

12 Solution Problem 1

13 Problem 2 Perform the reachability analysis on the network (M,N).
What sizes of buffers are needed for the two FIFO channels? Are there non-executable states or transitions ?

14 Solution Problem 2


Download ppt "PROTOCOL CORRECTNESS Tutorial 3 Theoretical"

Similar presentations


Ads by Google