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.

Slides:



Advertisements
Similar presentations
The SPIN System. What is SPIN? Model-checker. Based on automata theory. Allows LTL or automata specification Efficient (on-the-fly model checking, partial.
Advertisements

Mutual Exclusion – SW & HW By Oded Regev. Outline: Short review on the Bakery algorithm Short review on the Bakery algorithm Black & White Algorithm Black.
CS542 Topics in Distributed Systems Diganta Goswami.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CS 290C: Formal Models for Web Software Lecture 3: Verification of Navigation Models with the Spin Model Checker Instructor: Tevfik Bultan.
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,
Vered Gafni, The Design Language of Statecharts.
CIS 725 Guarded Command Notation. Programming language style notation Guarded actions en(a)  a en(a): guard of the action boolean condition or boolean.
CSE 522 UPPAAL – A Model Checking Tool Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee
CIS 720 Mutual Exclusion. Critical Section problem Process i do (true) entry protocol; critical section; exit protocol; non-critical section od.
Distributed Process Management
Chapter 18 Distributed Process Management Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
1 Algorithms and protocols for distributed systems We have defined process groups as having peer or hierarchical structure and have seen that a coordinator.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
What we will cover…  Distributed Coordination 1-1.
Distributed Process Management
Chapter 11: Distributed Processing Parallel programming Principles of parallel programming languages Concurrent execution –Programming constructs –Guarded.
Synchronization in Distributed Systems. Mutual Exclusion To read or update shared data, a process should enter a critical region to ensure mutual exclusion.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed Mutual Exclusion.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
Representing distributed algorithms Why do we need these? Don’t we already know a lot about programming? Well, you need to capture the notions of atomicity,
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
Correctness requirements. Basic Types of Claims Basic assertions End-state labels Progress-state labels Accept-state labels Never claims Trace assertions.
4.5 Distributed Mutual Exclusion Ranjitha Shivarudraiah.
Maekawa’s algorithm Divide the set of processes into subsets that satisfy the following two conditions: i  S i  i,j :  i,j  n-1 :: S i  S j.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
1 Distributed Process Management Chapter Distributed Global States Operating system cannot know the current state of all process in the distributed.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
1 Chapter 10 Distributed Algorithms. 2 Chapter Content This and the next two chapters present algorithms designed for loosely-connected distributed systems.
Vector Clock Each process maintains an array of clocks –vc.j.k denotes the knowledge that j has about the clock of k –vc.j.j, thus, denotes the clock of.
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 --->
Program correctness The State-transition model A global states S  s 0 x s 1 x … x s m {s k = set of local states of process k} S0  S1  S2  Each state.
Hwajung Lee. The State-transition model The set of global states = s 0 x s 1 x … x s m {s k is the set of local states of process k} S0  S1  S2  Each.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion & Leader Election Steve Ko Computer Sciences and Engineering University.
CIS 720 Asynchronous Message Passing. Asynchronous message passing Send is non-blocking Modeling a channel c: 1.Two variables: sent c, recv c 2.Queue.
Lecture 4 Introduction to Promela. Promela and Spin Promela - process meta language G. Holzmann, Bell Labs (Lucent) C-like language + concurrency dyamic.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
CIS 720 Lecture 5. Techniques to avoid interference Disjoint variables –If the write set of each process is disjoint from the read and write set of other.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Lecture 7- 1 CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 7 Distributed Mutual Exclusion Section 12.2 Klara Nahrstedt.
CIS 720 Asynchronous Message Passing. Dining philosophers problem P 0 : do hungry acquire left and right fork eat release forks sleep od.
Distributed Algorithms Dr. Samir Tartir Extracted from Principles of Concurrent and Distributed Programming, Second Edition By M. Ben-Ari.
1 Chapter 11 Global Properties (Distributed Termination)
Chapter pages1 Distributed Process Management Chapter 14.
Hwajung Lee. Mutual Exclusion CS p0 p1 p2 p3 Some applications are:  Resource sharing  Avoiding concurrent update on shared data  Controlling the.
Token-passing Algorithms Suzuki-Kasami algorithm The Main idea Completely connected network of processes There is one token in the network. The holder.
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.
Classifying fault-tolerance Masking tolerance. Application runs as it is. The failure does not have a visible impact. All properties (both liveness & safety)
Revisiting Logical Clocks: Mutual Exclusion Problem statement: Given a set of n processes, and a shared resource, it is required that: –Mutual exclusion.
The Principles of Operating Systems Chapter 9 Distributed Process Management.
PROTOCOL CORRECTNESS Tutorial 3 Theoretical
Atomicity, Non-determinism, Fairness
ITEC452 Distributed Computing Lecture 5 Program Correctness
Lecture 19 Syed Mansoor Sarwar
Distributed Algorithms
Outline Distributed Mutual Exclusion Introduction Performance measures
CIS 720 Message Passing.
CIS 720 Message Passing.
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
CIS 720 Lecture 5.
CIS 720 Message Passing.
Asynchronous Message Passing
CIS 720 Lecture 5.
Asynchronous Message Passing
Asynchronous Message Passing
Distributed Systems and Concurrency: Synchronization in Distributed Systems Majeed Kassis.
Presentation transcript:

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 S * A  S

Communicating FSM send actions: -m or !m q ! m = send message m to q receive actions: +m or ? m q ? m = receive message from q internal actions

Protocol A collection of CFSMs

Asynchronous coupling Channels ch1 = channel from M to N ch2 = channel from N to M Global state: (q1, q2, x, y) q1 = state of M q2 = state of N x = messages in transit to M y = messages in transit to N

Protocol actions Each protocol action results in a change in the global state

Error states Deadlock states: - state from which no transition is enabled Unspecified reception: - a state in which a message exists in a channel but no transition is enabled in the state to receive it.

Meeting appointment !meeting waiting meeting ?OK - Initial state: studying - Send a message for meeting - May decide to cancel anytime studying

Two-process mutual exclusion: Token ring protocol - Single token circulates among two nodes - Node with the token can enter the critical section

Request-based Token ring protocol - To get the token, send a request to the other node

Request-based Token ring protocol no_token enter exit in_cs& req_recd token & req_recd ?req !token req_sent token ?token !req ?token !req in_cs enter exit in_cs enter exit

Programming language style notation Guarded actions en(a)  a en(a): guard of the action boolean condition or boolean condition + receive statement

Normal form init; do en(a 1 )  a 1 [] en(a 2 )  a 2 : od

Token-based system P1: hold = false; in_cs = false do ? token  hold = true [] hold /\ not in_cs  ! Token; hold =false [] hold  in_cs = true [] in_cs  in_cs = false od