PROTOCOL CORRECTNESS Tutorial 3 Theoretical

Slides:



Advertisements
Similar presentations
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Distributed Mutual Exclusion.
Advertisements

Global States.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 6 Instructor: Haifeng YU.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Lecture 8: Asynchronous Network Algorithms
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Reliable Multicast Steve Ko Computer Sciences and Engineering University at Buffalo.
SES Algorithm SES: Schiper-Eggli-Sandoz Algorithm. No need for broadcast messages. Each process maintains a vector V_P of size N - 1, N the number of processes.
Program correctness The State-transition model A global state S  s 0 x s 1 x … x s m {s k = local state of process k} S0  S1  S2  … Each state transition.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Uncoordinated Checkpointing The Global State Recording Algorithm Cristian Solano.
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Reachability analysis A reachability analysis shows the product space of the two processes and the signal queues of their input ports. Say we have an SDL.
CS542 Topics in Distributed Systems Diganta Goswami.
Global State Collection. Global state collection Some applications - computing network topology - termination detection - deadlock detection Chandy-Lamport.
Distributed Snapshot (continued)
CS 582 / CMPE 481 Distributed Systems
Causality & Global States. P1 P2 P Physical Time 4 6 Include(obj1 ) obj1.method() P2 has obj1 Causality violation occurs when order.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
Cloud Computing Concepts
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed Mutual Exclusion.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Lecture 6-1 Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013 Indranil Gupta (Indy) September 12, 2013 Lecture 6 Global Snapshots Reading:
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
More on Semaphores Andy Wang Operating Systems COP 4610 / CGS 5765.
Program correctness The State-transition model The set of global states = so x s1 x … x sm {sk is the set of local states of process k} S0 ---> S1 --->
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
Hwajung Lee. -- How many messages are in transit on the internet? --What is the global state of a distributed system of N processes? How do we compute.
D ISTRIBUTED S YSTEM UNIT-2 Theoretical Foundation for Distributed Systems Prepared By: G.S.Mishra.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
CSE 486/586 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
Hwajung Lee. Some applications - computing network topology - termination detection - deadlock detection Chandy Lamport algorithm does a partial job.
CIS 725 Lecture 2. Finite State Machine Model FSM = (A, S, T, s 0 ) A = set of actions S = set of states s 0 = initial states T = transition relation.
1 Chapter 11 Global Properties (Distributed Termination)
Page 1 8/29/2001 Reachability Analysis CFSM: Communicating Finite State Machines C1 C2 +A+A Sender 2 1 -R-R +R+R -A-A Receiver 2 1 CFSM Communicating Finite.
ICS Deadlocks 6.1 Deadlocks with Reusable and Consumable Resources 6.2 Approaches to the Deadlock Problem 6.3 A System Model –Resource Graphs –State.
Pitfalls: Time Dependent Behaviors CS433 Spring 2001 Laxmikant Kale.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Global state and snapshot
Dr. Eng Amr T. Abdel-Hamid
CSE 486/586 Distributed Systems Reliable Multicast --- 1
Termination detection
Dr. Eng Amr T. Abdel-Hamid
Global state and snapshot
Mutual Exclusion Continued
CSE 486/586 Distributed Systems Global States
Lecture 9: Asynchronous Network Algorithms
ITEC452 Distributed Computing Lecture 9 Global State Collection
EECS 498 Introduction to Distributed Systems Fall 2017
ITEC452 Distributed Computing Lecture 5 Program Correctness
湖南大学-信息科学与工程学院-计算机与科学系
Global state collection
Slides for Chapter 14: Time and Global States
Mutual Exclusion CS p0 CS p1 p2 CS CS p3.
Global State Collection
CSE 486/586 Distributed Systems Mutual Exclusion
Chapter 5 (through section 5.4)
Slides for Chapter 14: Time and Global States
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
ITEC452 Distributed Computing Lecture 8 Distributed Snapshot
CSE 486/586 Distributed Systems Global States
Lecture 18: Coherence and Synchronization
Jenhui Chen Office number:
CIS825 Lecture 5 1.
Distributed Mutual eXclusion
CSE 486/586 Distributed Systems Mutual Exclusion
CSE 486/586 Distributed Systems Reliable Multicast --- 1
Distributed Snapshot.
Presentation transcript:

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

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.

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.

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.

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.

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

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.

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.

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

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.

Problem 1

Solution Problem 1

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 ?

Solution Problem 2