Distributed Deadlock-Avoidance. IMDEA Software Institute, Spain

Size: px
Start display at page:

Download "Distributed Deadlock-Avoidance. IMDEA Software Institute, Spain"

Transcription

1 Distributed Deadlock-voidance César Sánchez IMDE Software Institute, Spain DRV Workshop, ertinoro 19-May, 216

2 Distributed Deadlock-voidance little story about how static knowledge can help solve unsolvable problems César Sánchez IMDE Software Institute, Spain DRV Workshop, ertinoro 19-May, 216

3 Introduction Goal: Formalization of middleware services pp pp pp Middleware Middleware Event Channels Deadlock voidance OS 1 OS 2 OS 3

4 Deadlocks Deadlock is one of the classical problems in CS One (common) approach is the ostrich approach The other approaches are: detection, prevention and avoidance. centralized distributed detection OK OK prevention OK OK avoidance anker s impractical Efficient dynamic resource allocation can have a big practical impact.

5 Distributed Dinning Philosophers

6 Distributed Dinning Philosophers deadlock state

7 Distributed Dinning Philosophers Detection:

8 Distributed Dinning Philosophers Prevention: 3 2 1

9 Distributed Dinning Philosophers voidance:?

10 Distributed Dinning Philosophers Distributed voidance:???

11 Deadlock voidance Problem Space Centralized Distributed Unsolvable Unsolvable

12 Deadlock voidance Problem Space Centralized Distributed Unsolvable Unsolvable Max utilization

13 Deadlock voidance Problem Space Centralized Distributed Unsolvable Unsolvable Max utilization [Dijkstra 65] [Singhal 95]

14 Deadlock voidance Problem Space Centralized Distributed Unsolvable Unsolvable Max utilization [Dijkstra 65] [Singhal 95] [de lfaro+:5] FMS

15 Deadlock voidance Problem Space Centralized Distributed Unsolvable Unsolvable Max utilization [Dijkstra 65] [Singhal 95] [de lfaro+:5] FMS?

16 Distributed Real-Time and Embedded F C E D

17 Distributed Real-Time and Embedded n 1 F C E D

18 Distributed Real-Time and Embedded n 1 F n 2 C E D

19 Distributed Real-Time and Embedded n 1 n 3 F n 2 C E n 5 D

20 Distributed Real-Time and Embedded n 1 n 4 n 3 F n 2 C E n 5 D

21 Distributed Real-Time and Embedded n 1 n 4 n 3 F n 2 C E n 5 D Sequence of calls: n 1 C n 5 E n 2 n 3 n 1

22 Distributed Real-Time Embedded Systems Distributed Real-Time Embedded Systems: synchronous distributed system Limited Resources Wait-on-connection rbitrary number of processes spawned ll processes terminate Problem: deadlocks are possible if no controller is used

23 Example of Deadlock Two sites, with two resources each: and the call graph: n 1 n 2 m 1 m 2

24 Example of Deadlock Two sites, with two resources each: and the call graph: n 1 n 2 m 1 m 2

25 Example of Deadlock Two sites, with two resources each: and the call graph: n 1 n 2 m 1 m 2

26 Example of Deadlock Two sites, with two resources each: and the call graph: n 1 n 2 m 1 m 2

27 Example of Deadlock Two sites, with two resources each: and the call graph: n 1 n 2 m 1 m 2

28 Example of Deadlock Two sites, with two resources each: and the call graph: n 1 n 2 m 1 m 2

29 Example of Deadlock Two sites, with two resources each: and the call graph: n 1 n 2 m 1 m 2

30 Summary of Contributions Contribution #1 Efficient deadlock voidance can is possible provided call-graphs are know statically

31 Summary of Contributions Contribution #1 Efficient deadlock voidance can is possible provided call-graphs are know statically Contribution #2 Optimal annotations can be efficiently computed. If annotations are not followed anomalies can occurr.

32 Summary of Contributions Contribution #1 Efficient deadlock voidance can is possible provided call-graphs are know statically Contribution #2 Optimal annotations can be efficiently computed. If annotations are not followed anomalies can occurr. Contribution #3 Distributed Deadlock voidance with (individual) liveness guarantees can be efficiently achieved.

33 Model of Computation Remote procedure call (with Wait-On-Connection) synchronous messages ll to all communication Finite resources: T total number of threads F C E D

34 Model of Computation Remote procedure call (with Wait-On-Connection) synchronous messages ll to all communication Finite resources: T total number of threads F C E D We seek a deadlock avoidance solution with no extra communication

35 Distributed Deadlock voidance Solution Two parts: 1. Static: 2. Dynamic:

36 Distributed Deadlock voidance Solution Two parts: 1. Static: 1 n 1 C n 5 E n 2 n 3 n 1 2. Dynamic:

37 Distributed Deadlock voidance Solution Two parts: 1. Static: 1 n 1 C n 5 E n 2 n 3 n 1 2. Dynamic: when En do In n 1 () Out } entry section } method invocation } exit section

38 nnotations nnotations are computed statically n 1 n 2 m 1 m 2

39 nnotations nnotations are computed statically n 1 n 2 m 1 m 2 Dependency edges n same node. m whenever α(n) m for two calls in the

40 nnotations nnotations are computed statically n 1 n 2 m 1 m 2 Dependency edges n m whenever α(n) m for two calls in the same node. n 1 n 2 m 1 m 2

41 nnotations nnotations are computed statically n 1 n 2 m 1 m 2 Dependency edges n m whenever α(n) m for two calls in the same node. n 1 n 2 m 1 m 2 n depends on m if there is a path from n to m containing a dependency cycle is close path with a

42 nnotations nnotations are computed statically n 1 n 2 m 1 m 2 Dependency edges n m whenever α(n) m for two calls in the same node. n 1 n 2 m 1 m 2 DependencyCycle n depends on m if there is a path from n to m containing a dependency cycle is close path with a

43 nnotations nnotations are computed statically n 1 n 2 m 1 m 2 Dependency edges n m whenever α(n) m for two calls in the same node. 1 n 1 n 2 m 1 1 m 2 DependencyCycle n depends on m if there is a path from n to m containing a dependency cycle is close path with a

44 nnotations nnotations are computed statically n 1 n 2 m 1 m 2 Dependency edges n m whenever α(n) m for two calls in the same node. 1 n 1 n 2 m 1 m 2 DependencyCycle n depends on m if there is a path from n to m containing a dependency cycle is close path with a

45 asic Solution Deadlock voidance Protocol asic-p: n 1 α [ ] when α < t do t n 1 () t ++

46 asic Solution Deadlock voidance Protocol asic-p: n 1 α [ ] when α < t do t n 1 () t ++ Theorem: If α has no cyclic dependencies, then asic-p guarantees absence of deadlock.

47 asic Solution Deadlock voidance Protocol asic-p: n 1 α [ ] when α < t do t n 1 () t ++ Theorem: If α has no cyclic dependencies, then asic-p guarantees absence of deadlock. Lemma: The following is an invariant: The number of processes running methods with annotation i or higher is at most T i.

48 The nnotation Theorem Theorem: If α has no cyclic dependencies, then asic-p guarantees absence of deadlock. Lemma: The following is an invariant: The number of processes running methods with annotation i or higher is at most T i. annotation α Max num of procs T 1 T T 1 1

49 The nnotation Theorem Theorem: If α has no cyclic dependencies, then asic-p guarantees absence of deadlock. Lemma: The following is an invariant: The number of processes running methods with annotation i or higher is at most T i. Lemma: If a request n 1 is disabled, then α 2 there is an active process running with α 2 α. α n 2

50 nnotations Two immediate questions: 1. How to compute acyclic annotations 2. What if annotations are not acyclic?

51 nnotations Two immediate questions: 1. How to compute acyclic annotations Visit nodes following some reverse topological order. When visiting n, compute the set of nodes S previously visited and reachable following ( ). Set α(n) to 1 plus the largest node in S that resides in the same site. 2. What if annotations are not acyclic?

52 nnotations Two immediate questions: 1. How to compute acyclic annotations Visit nodes following some reverse topological order. When visiting n, compute the set of nodes S previously visited and reachable following ( ). Set α(n) to 1 plus the largest node in S that resides in the same site. 2. What if annotations are not acyclic? n 1 m 1 C C n 2 m 2 n 3 m 3 T = 1 T = 1 T C = 1

53 nnotations Two immediate questions: 1. How to compute acyclic annotations Visit nodes following some reverse topological order. When visiting n, compute the set of nodes S previously visited and reachable following ( ). Set α(n) to 1 plus the largest node in S that resides in the same site. 2. What if annotations are not acyclic? n 1 m 1 C C n 2 m 2 n 3 m 3 FCT: Given enough resources, a deadlock is reachable T = 1 T = 1 T C = 1

54 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = 2 t = 2 and the call graph: n 1 n 2 m 1 1 m 2

55 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = 2 t = 2 and the call graph: n 1 n 2 m 1 1 m 2

56 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = t = 2 and the call graph: n 1 n 2 m 1 1 m 2

57 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = t = 2 and the call graph: n 1 n 2 m 1 1 m 2

58 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = t = and the call graph: n 1 n 2 m 1 1 m 2

59 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = t = 1 and the call graph: n 1 n 2 m 1 1 m 2

60 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = 1 t = 1 and the call graph: n 1 n 2 m 1 1 m 2

61 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = t = 1 and the call graph: n 1 n 2 m 1 1 m 2

62 How about liveness? Consider two nodes, with two resource each (T = T = 2): t = t = and the call graph: n 1 n 2 m 1 1 m 2

63 Revisiting the Invariant Lemma: The following is an invariant: The number of processes running methods with annotation i or higher is at most T i. act, i T i for all notes and i where act,i : number of active processes in with annotation i act, i = k i act,i

64 Revisiting the Invariant Lemma: The following is an invariant: The number of processes running methods with annotation i or higher is at most T i. act, i T i for all notes and i where act,i : number of active processes in with annotation i act, i = k i act,i The weakest precondition on allowing a request for n i ϕ = k { act, k T k if k > i act, k + 1 T k if k i

65 The Protocol Live-P i To execute n : [ ] when ϕ do act,i ++ n() act,i Theorem (Deadlock voidance): If α is acyclic, then Live-P guarantees absence of deadlock. Theorem (Liveness): If α is acyclic, then Live-P guarantees that every waiting process is eventually enabled.

66 Live-P provides liveness Consider two nodes, with two resource each (T = T = 2): t = 2 t = 2 Live-P asic-p n 1 n 2 n 1 n 2 m 1 1 m 2 m 1 1 m 2 act, act, 1

67 Live-P provides liveness Consider two nodes, with two resource each (T = T = 2): t = 2 t = 2 Live-P asic-p n 1 n 2 n 1 n 2 m 1 1 m 2 m 1 1 m 2 act, act, 1

68 Live-P provides liveness Consider two nodes, with two resource each (T = T = 2): t = t = 2 Live-P asic-p n 1 n 2 n 1 n 2 m 1 1 m 2 m 1 1 m 2 act, act, 1

69 Live-P provides liveness Consider two nodes, with two resource each (T = T = 2): t = t = 2 Live-P asic-p n 1 n 2 n 1 n 2 m 1 1 m 2 m 1 1 m 2 act, act, 1

70 Live-P provides liveness Consider two nodes, with two resource each (T = T = 2): t = t = Live-P asic-p n 1 n 2 n 1 n 2 m 1 1 m 2 m 1 1 m 2 act, act, 1

71 Live-P provides liveness Consider two nodes, with two resource each (T = T = 2): t = t = 1 Live-P asic-p n 1 n 2 n 1 n 2 m 1 1 m 2 m 1 1 m 2 act, act, 1

72 Conclusions Distributed Deadlock voidance is possible without communication... provided call-graphs are known Using static annotations + runtime protocols If cycles are allowed (e.g. by uncontrolled resource allocation), then deadlocks are unavoidable, provided enough resources Individual liveness is also enforceable Future work: is deadlock avoidance enforceable for any amount of initial resources? can this be adapted to composable conveyor systems?

73 Conclusions Distributed Deadlock voidance is possible without communication... provided call-graphs are known Using static annotations + runtime protocols If cycles are allowed (e.g. by uncontrolled resource allocation), then deadlocks are unavoidable, provided enough resources Individual liveness is also enforceable Future work: is deadlock avoidance enforceable for any amount of initial resources? can this be adapted to composable conveyor systems?

74 Distributed Dinning Philosphers Distributed voidance:???

75 Distributed Dinning Philosphers Distributed voidance:?? SOLUTION:?

76 Distributed Dinning Philosphers Distributed voidance:? 3 2 1?? SOLUTION: For your first pick, do not the take last fork if going in increasing order. For your second pick, do as you wish.

77 Questions Thank you for your attention!

On Efficient Distributed Deadlock Avoidance for Real-Time and Embedded Systems

On Efficient Distributed Deadlock Avoidance for Real-Time and Embedded Systems On Efficient Distributed Deadlock Avoidance for Real-Time and Embedded Systems César Sánchez 1 Henny B. Sipma 1 Zohar Manna 1 Venkita Subramonian 2 Christopher Gill 2 1 Stanford University 2 Washington

More information

Thread Allocation Protocols for Distributed Real-Time and Embedded Systems

Thread Allocation Protocols for Distributed Real-Time and Embedded Systems Thread Allocation Protocols for Distributed Real-Time and Embedded Systems César Sánchez 1, Henny B. Sipma 1, Venkita Subramonian 2, Christopher Gill 2, and Zohar Manna 1 1 Computer Science Department

More information

1 Lamport s Bakery Algorithm

1 Lamport s Bakery Algorithm Com S 6 Spring Semester 2009 Algorithms for Multiprocessor Synchronization Lecture 3: Tuesday, 27th January 2009 Instructor: Soma Chaudhuri Scribe: Neeraj Khanolkar Lamport s Bakery Algorithm Algorithm

More information

6.852: Distributed Algorithms Fall, Class 10

6.852: Distributed Algorithms Fall, Class 10 6.852: Distributed Algorithms Fall, 2009 Class 10 Today s plan Simulating synchronous algorithms in asynchronous networks Synchronizers Lower bound for global synchronization Reading: Chapter 16 Next:

More information

CIS 4930/6930: Principles of Cyber-Physical Systems

CIS 4930/6930: Principles of Cyber-Physical Systems CIS 4930/6930: Principles of Cyber-Physical Systems Chapter 11 Scheduling Hao Zheng Department of Computer Science and Engineering University of South Florida H. Zheng (CSE USF) CIS 4930/6930: Principles

More information

Bilateral Proofs of Safety and Progress Properties of Concurrent Programs (Working Draft)

Bilateral Proofs of Safety and Progress Properties of Concurrent Programs (Working Draft) Bilateral Proofs of Safety and Progress Properties of Concurrent Programs (Working Draft) Jayadev Misra December 18, 2015 Contents 1 Introduction 3 2 Program and Execution Model 4 2.1 Program Structure..........................

More information

Asynchronous Models For Consensus

Asynchronous Models For Consensus Distributed Systems 600.437 Asynchronous Models for Consensus Department of Computer Science The Johns Hopkins University 1 Asynchronous Models For Consensus Lecture 5 Further reading: Distributed Algorithms

More information

Our Problem. Model. Clock Synchronization. Global Predicate Detection and Event Ordering

Our Problem. Model. Clock Synchronization. Global Predicate Detection and Event Ordering Our Problem Global Predicate Detection and Event Ordering To compute predicates over the state of a distributed application Model Clock Synchronization Message passing No failures Two possible timing assumptions:

More information

Embedded Systems 6 REVIEW. Place/transition nets. defaults: K = ω W = 1

Embedded Systems 6 REVIEW. Place/transition nets. defaults: K = ω W = 1 Embedded Systems 6-1 - Place/transition nets REVIEW Def.: (P, T, F, K, W, M 0 ) is called a place/transition net (P/T net) iff 1. N=(P,T,F) is a net with places p P and transitions t T 2. K: P (N 0 {ω})

More information

Structural Analysis of Resource Allocation Systems with Synchronization Constraints

Structural Analysis of Resource Allocation Systems with Synchronization Constraints Structural Analysis of Resource Allocation Systems with Synchronization Constraints Spyros Reveliotis School of Industrial & Systems Engineering Georgia Institute of Technology Atlanta, GA 30332 USA Abstract

More information

Safety and Liveness. Thread Synchronization: Too Much Milk. Critical Sections. A Really Cool Theorem

Safety and Liveness. Thread Synchronization: Too Much Milk. Critical Sections. A Really Cool Theorem Safety and Liveness Properties defined over an execution of a program Thread Synchronization: Too Much Milk Safety: nothing bad happens holds in every finite execution prefix Windows never crashes No patient

More information

A Weakest Failure Detector for Dining Philosophers with Eventually Bounded Waiting and Failure Locality 1

A Weakest Failure Detector for Dining Philosophers with Eventually Bounded Waiting and Failure Locality 1 A Weakest Failure Detector for Dining Philosophers with Eventually Bounded Waiting and Failure Locality 1 Hyun Chul Chung, Jennifer L. Welch Department of Computer Science & Engineering Texas A&M University

More information

INF 4140: Models of Concurrency Series 3

INF 4140: Models of Concurrency Series 3 Universitetet i Oslo Institutt for Informatikk PMA Olaf Owe, Martin Steffen, Toktam Ramezani INF 4140: Models of Concurrency Høst 2016 Series 3 14. 9. 2016 Topic: Semaphores (Exercises with hints for solution)

More information

Model for reactive systems/software

Model for reactive systems/software Temporal Logics CS 5219 Abhik Roychoudhury National University of Singapore The big picture Software/ Sys. to be built (Dream) Properties to Satisfy (caution) Today s lecture System Model (Rough Idea)

More information

A walk over the shortest path: Dijkstra s Algorithm viewed as fixed-point computation

A walk over the shortest path: Dijkstra s Algorithm viewed as fixed-point computation A walk over the shortest path: Dijkstra s Algorithm viewed as fixed-point computation Jayadev Misra 1 Department of Computer Sciences, University of Texas at Austin, Austin, Texas 78712-1188, USA Abstract

More information

Time and Timed Petri Nets

Time and Timed Petri Nets Time and Timed Petri Nets Serge Haddad LSV ENS Cachan & CNRS & INRIA haddad@lsv.ens-cachan.fr DISC 11, June 9th 2011 1 Time and Petri Nets 2 Timed Models 3 Expressiveness 4 Analysis 1/36 Outline 1 Time

More information

Methods for the specification and verification of business processes MPB (6 cfu, 295AA)

Methods for the specification and verification of business processes MPB (6 cfu, 295AA) Methods for the specification and verification of business processes MPB (6 cfu, 295AA) Roberto Bruni http://www.di.unipi.it/~bruni 08 - Petri nets basics 1 Object Formalization of the basic concepts of

More information

The Weakest Failure Detector to Solve Mutual Exclusion

The Weakest Failure Detector to Solve Mutual Exclusion The Weakest Failure Detector to Solve Mutual Exclusion Vibhor Bhatt Nicholas Christman Prasad Jayanti Dartmouth College, Hanover, NH Dartmouth Computer Science Technical Report TR2008-618 April 17, 2008

More information

A subtle problem. An obvious problem. An obvious problem. An obvious problem. No!

A subtle problem. An obvious problem. An obvious problem. An obvious problem. No! A subtle problem An obvious problem when LC = t do S doesn t make sense for Lamport clocks! there is no guarantee that LC will ever be S is anyway executed after LC = t Fixes: if e is internal/send and

More information

Last class: Today: Synchronization. Deadlocks

Last class: Today: Synchronization. Deadlocks Last class: Synchronization Today: Deadlocks Definition A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause. An event could

More information

CSC501 Operating Systems Principles. Deadlock

CSC501 Operating Systems Principles. Deadlock CSC501 Operating Systems Principles Deadlock 1 Last Lecture q Priority Inversion Q Priority Inheritance Protocol q Today Q Deadlock 2 The Deadlock Problem q Definition Q A set of blocked processes each

More information

The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion

The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion Srikanth Sastry Computer Science and Engr Texas A&M University College Station, TX, USA sastry@cse.tamu.edu Scott M. Pike

More information

arxiv: v1 [cs.pl] 5 Apr 2017

arxiv: v1 [cs.pl] 5 Apr 2017 arxiv:1704.01814v1 [cs.pl] 5 Apr 2017 Bilateral Proofs of Safety and Progress Properties of Concurrent Programs Jayadev Misra University of Texas at Austin, misra@utexas.edu April 5, 2017 Abstract This

More information

7. Queueing Systems. 8. Petri nets vs. State Automata

7. Queueing Systems. 8. Petri nets vs. State Automata Petri Nets 1. Finite State Automata 2. Petri net notation and definition (no dynamics) 3. Introducing State: Petri net marking 4. Petri net dynamics 5. Capacity Constrained Petri nets 6. Petri net models

More information

Distributed Algorithms

Distributed Algorithms Distributed Algorithms December 17, 2008 Gerard Tel Introduction to Distributed Algorithms (2 nd edition) Cambridge University Press, 2000 Set-Up of the Course 13 lectures: Wan Fokkink room U342 email:

More information

Methods for the specification and verification of business processes MPB (6 cfu, 295AA)

Methods for the specification and verification of business processes MPB (6 cfu, 295AA) Methods for the specification and verification of business processes MPB (6 cfu, 295AA) Roberto Bruni http://www.di.unipi.it/~bruni 17 - Diagnosis for WF nets 1 Object We study suitable diagnosis techniques

More information

Notation. Bounds on Speedup. Parallel Processing. CS575 Parallel Processing

Notation. Bounds on Speedup. Parallel Processing. CS575 Parallel Processing Parallel Processing CS575 Parallel Processing Lecture five: Efficiency Wim Bohm, Colorado State University Some material from Speedup vs Efficiency in Parallel Systems - Eager, Zahorjan and Lazowska IEEE

More information

Clocks in Asynchronous Systems

Clocks in Asynchronous Systems Clocks in Asynchronous Systems The Internet Network Time Protocol (NTP) 8 Goals provide the ability to externally synchronize clients across internet to UTC provide reliable service tolerating lengthy

More information

1 Ways to Describe a Stochastic Process

1 Ways to Describe a Stochastic Process purdue university cs 59000-nmc networks & matrix computations LECTURE NOTES David F. Gleich September 22, 2011 Scribe Notes: Debbie Perouli 1 Ways to Describe a Stochastic Process We will use the biased

More information

Petri Nets and Model Checking. Natasa Gkolfi. University of Oslo. March 31, 2017

Petri Nets and Model Checking. Natasa Gkolfi. University of Oslo. March 31, 2017 University of Oslo March 31, 2017 Petri Nets Petri Nets : mathematically founded formalism concurrency synchronization modeling distributed systems Petri Nets Petri Nets : mathematically founded formalism

More information

Axiomatic Semantics: Verification Conditions. Review of Soundness and Completeness of Axiomatic Semantics. Announcements

Axiomatic Semantics: Verification Conditions. Review of Soundness and Completeness of Axiomatic Semantics. Announcements Axiomatic Semantics: Verification Conditions Meeting 12, CSCI 5535, Spring 2009 Announcements Homework 4 is due tonight Wed forum: papers on automated testing using symbolic execution 2 Questions? Review

More information

Distributed Algorithms (CAS 769) Dr. Borzoo Bonakdarpour

Distributed Algorithms (CAS 769) Dr. Borzoo Bonakdarpour Distributed Algorithms (CAS 769) Week 1: Introduction, Logical clocks, Snapshots Dr. Borzoo Bonakdarpour Department of Computing and Software McMaster University Dr. Borzoo Bonakdarpour Distributed Algorithms

More information

Do we have a quorum?

Do we have a quorum? Do we have a quorum? Quorum Systems Given a set U of servers, U = n: A quorum system is a set Q 2 U such that Q 1, Q 2 Q : Q 1 Q 2 Each Q in Q is a quorum How quorum systems work: A read/write shared register

More information

How to deal with uncertainties and dynamicity?

How to deal with uncertainties and dynamicity? How to deal with uncertainties and dynamicity? http://graal.ens-lyon.fr/ lmarchal/scheduling/ 19 novembre 2012 1/ 37 Outline 1 Sensitivity and Robustness 2 Analyzing the sensitivity : the case of Backfilling

More information

Announcements. Project #1 grades were returned on Monday. Midterm #1. Project #2. Requests for re-grades due by Tuesday

Announcements. Project #1 grades were returned on Monday. Midterm #1. Project #2. Requests for re-grades due by Tuesday Announcements Project #1 grades were returned on Monday Requests for re-grades due by Tuesday Midterm #1 Re-grade requests due by Monday Project #2 Due 10 AM Monday 1 Page State (hardware view) Page frame

More information

THEORY OF SYSTEMS MODELING AND ANALYSIS. Henny Sipma Stanford University. Master class Washington University at St Louis November 16, 2006

THEORY OF SYSTEMS MODELING AND ANALYSIS. Henny Sipma Stanford University. Master class Washington University at St Louis November 16, 2006 THEORY OF SYSTEMS MODELING AND ANALYSIS Henny Sipma Stanford University Master class Washington University at St Louis November 16, 2006 1 1 COURSE OUTLINE 8:37-10:00 Introduction -- Computational model

More information

Program verification. Hoare triples. Assertional semantics (cont) Example: Semantics of assignment. Assertional semantics of a program

Program verification. Hoare triples. Assertional semantics (cont) Example: Semantics of assignment. Assertional semantics of a program Program verification Assertional semantics of a program Meaning of a program: relation between its inputs and outputs; specified by input assertions (pre-conditions) and output assertions (post-conditions)

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

Outline F eria AADL behavior 1/ 78

Outline F eria AADL behavior 1/ 78 Outline AADL behavior Annex Jean-Paul Bodeveix 2 Pierre Dissaux 3 Mamoun Filali 2 Pierre Gaufillet 1 François Vernadat 2 1 AIRBUS-FRANCE 2 FéRIA 3 ELLIDIS SAE AS2C Detroit Michigan April 2006 FéRIA AADL

More information

Algorithmic verification

Algorithmic verification Algorithmic verification Ahmed Rezine IDA, Linköpings Universitet Hösttermin 2018 Outline Overview Model checking Symbolic execution Outline Overview Model checking Symbolic execution Program verification

More information

On Equilibria of Distributed Message-Passing Games

On Equilibria of Distributed Message-Passing Games On Equilibria of Distributed Message-Passing Games Concetta Pilotto and K. Mani Chandy California Institute of Technology, Computer Science Department 1200 E. California Blvd. MC 256-80 Pasadena, US {pilotto,mani}@cs.caltech.edu

More information

Section 6 Fault-Tolerant Consensus

Section 6 Fault-Tolerant Consensus Section 6 Fault-Tolerant Consensus CS586 - Panagiota Fatourou 1 Description of the Problem Consensus Each process starts with an individual input from a particular value set V. Processes may fail by crashing.

More information

Analysis and Optimization of Discrete Event Systems using Petri Nets

Analysis and Optimization of Discrete Event Systems using Petri Nets Volume 113 No. 11 2017, 1 10 ISSN: 1311-8080 (printed version); ISSN: 1314-3395 (on-line version) url: http://www.ijpam.eu ijpam.eu Analysis and Optimization of Discrete Event Systems using Petri Nets

More information

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University } 2017/11/15 Midterm } 2017/11/22 Final Project Announcement 2 1. Introduction 2.

More information

Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms. CS 249 Project Fall 2005 Wing Wong

Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms. CS 249 Project Fall 2005 Wing Wong Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms CS 249 Project Fall 2005 Wing Wong Outline Introduction Asynchronous distributed systems, distributed computations,

More information

Lecture Notes on Ordered Proofs as Concurrent Programs

Lecture Notes on Ordered Proofs as Concurrent Programs Lecture Notes on Ordered Proofs as Concurrent Programs 15-317: Constructive Logic Frank Pfenning Lecture 24 November 30, 2017 1 Introduction In this lecture we begin with a summary of the correspondence

More information

THE WEAKEST FAILURE DETECTOR FOR SOLVING WAIT-FREE, EVENTUALLY BOUNDED-FAIR DINING PHILOSOPHERS. A Dissertation YANTAO SONG

THE WEAKEST FAILURE DETECTOR FOR SOLVING WAIT-FREE, EVENTUALLY BOUNDED-FAIR DINING PHILOSOPHERS. A Dissertation YANTAO SONG THE WEAKEST FAILURE DETECTOR FOR SOLVING WAIT-FREE, EVENTUALLY BOUNDED-FAIR DINING PHILOSOPHERS A Dissertation by YANTAO SONG Submitted to the Office of Graduate Studies of Texas A&M University in partial

More information

CS 453 Operating Systems. Lecture 7 : Deadlock

CS 453 Operating Systems. Lecture 7 : Deadlock CS 453 Operating Systems Lecture 7 : Deadlock 1 What is Deadlock? Every New Yorker knows what a gridlock alert is - it s one of those days when there is so much traffic that nobody can move. Everything

More information

Verifying Randomized Distributed Algorithms with PRISM

Verifying Randomized Distributed Algorithms with PRISM Verifying Randomized Distributed Algorithms with PRISM Marta Kwiatkowska, Gethin Norman, and David Parker University of Birmingham, Birmingham B15 2TT, United Kingdom {M.Z.Kwiatkowska,G.Norman,D.A.Parker}@cs.bham.ac.uk

More information

Operating Systems. VII. Synchronization

Operating Systems. VII. Synchronization Operating Systems VII. Synchronization Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Synchronization issues 2/22 Fall 2017 Institut

More information

Improper Nesting Example

Improper Nesting Example Improper Nesting Example One of the limits on the use of parbegin/parend, and any related constructs, is that the program involved must be properly nested. Not all programs are. For example, consider the

More information

A Thread Algebra with Multi-level Strategic Interleaving

A Thread Algebra with Multi-level Strategic Interleaving Theory of Computing Systems manuscript No. (will be inserted by the editor) A Thread Algebra with Multi-level Strategic Interleaving J.A. Bergstra 1,2, C.A. Middelburg 3,1 1 Programming Research Group,

More information

Figure 10.1 Skew between computer clocks in a distributed system

Figure 10.1 Skew between computer clocks in a distributed system Figure 10.1 Skew between computer clocks in a distributed system Network Instructor s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 Pearson Education 2001

More information

CS 336. We use the principle of inclusion and exclusion. Let B. = {five digit decimal numbers ending with a 5}, and

CS 336. We use the principle of inclusion and exclusion. Let B. = {five digit decimal numbers ending with a 5}, and CS 336 1. The important issue is the logic you used to arrive at your answer. 2. Use extra paper to determine your solutions then neatly transcribe them onto these sheets. 3. Do not submit the scratch

More information

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 Clojure Concurrency Constructs, Part Two CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 1 Goals Cover the material presented in Chapter 4, of our concurrency textbook In particular,

More information

Computer Science Technical Report

Computer Science Technical Report Computer Science Technical Report Synthesizing Self-Stabilization Through Superposition and Backtracking Alex Klinkhamer and Ali Ebnenasir Michigan Technological University Computer Science Technical Report

More information

Interface Automata with Complex Actions - Extended Version

Interface Automata with Complex Actions - Extended Version Interface Automata with Complex Actions - Extended Version Shahram Esmaeilsabzali Nancy A. Day Farhad Mavaddat David R. Cheriton School of Computer Science University of Waterloo Waterloo, Ontario, Canada

More information

Lecture Notes: Axiomatic Semantics and Hoare-style Verification

Lecture Notes: Axiomatic Semantics and Hoare-style Verification Lecture Notes: Axiomatic Semantics and Hoare-style Verification 17-355/17-665/17-819O: Program Analysis (Spring 2018) Claire Le Goues and Jonathan Aldrich clegoues@cs.cmu.edu, aldrich@cs.cmu.edu It has

More information

Cuts. Cuts. Consistent cuts and consistent global states. Global states and cuts. A cut C is a subset of the global history of H

Cuts. Cuts. Consistent cuts and consistent global states. Global states and cuts. A cut C is a subset of the global history of H Cuts Cuts A cut C is a subset of the global history of H C = h c 1 1 hc 2 2...hc n n A cut C is a subset of the global history of H The frontier of C is the set of events e c 1 1,ec 2 2,...ec n n C = h

More information

Time(d) Petri Net. Serge Haddad. Petri Nets 2016, June 20th LSV ENS Cachan, Université Paris-Saclay & CNRS & INRIA

Time(d) Petri Net. Serge Haddad. Petri Nets 2016, June 20th LSV ENS Cachan, Université Paris-Saclay & CNRS & INRIA Time(d) Petri Net Serge Haddad LSV ENS Cachan, Université Paris-Saclay & CNRS & INRIA haddad@lsv.ens-cachan.fr Petri Nets 2016, June 20th 2016 1 Time and Petri Nets 2 Time Petri Net: Syntax and Semantic

More information

Logical Time. 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation

Logical Time. 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation Logical Time Nicola Dragoni Embedded Systems Engineering DTU Compute 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation 2013 ACM Turing Award:

More information

Deadlock Ezio Bartocci Institute for Computer Engineering

Deadlock Ezio Bartocci Institute for Computer Engineering TECHNISCHE UNIVERSITÄT WIEN Fakultät für Informatik Cyber-Physical Systems Group Deadlock Ezio Bartocci Institute for Computer Engineering ezio.bartocci@tuwien.ac.at Deadlock Permanent blocking of a set

More information

Applications of Petri Nets

Applications of Petri Nets Applications of Petri Nets Presenter: Chung-Wei Lin 2010.10.28 Outline Revisiting Petri Nets Application 1: Software Syntheses Theory and Algorithm Application 2: Biological Networks Comprehensive Introduction

More information

CS162 Operating Systems and Systems Programming Lecture 7 Semaphores, Conditional Variables, Deadlocks"

CS162 Operating Systems and Systems Programming Lecture 7 Semaphores, Conditional Variables, Deadlocks CS162 Operating Systems and Systems Programming Lecture 7 Semaphores, Conditional Variables, Deadlocks" September 19, 2012! Ion Stoica! http://inst.eecs.berkeley.edu/~cs162! Recap: Monitors" Monitors represent

More information

Formal Reasoning CSE 331. Lecture 2 Formal Reasoning. Announcements. Formalization and Reasoning. Software Design and Implementation

Formal Reasoning CSE 331. Lecture 2 Formal Reasoning. Announcements. Formalization and Reasoning. Software Design and Implementation CSE 331 Software Design and Implementation Lecture 2 Formal Reasoning Announcements Homework 0 due Friday at 5 PM Heads up: no late days for this one! Homework 1 due Wednesday at 11 PM Using program logic

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

arxiv: v1 [cs.cr] 20 Dec 2012

arxiv: v1 [cs.cr] 20 Dec 2012 Modeling and Performance Evaluation of Computer Systems Security Operation D. Guster N. K. Krivulin arxiv:1212.5289v1 [cs.cr] 20 Dec 2012 Abstract A model of computer system security operation is developed

More information

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara Operating Systems Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ Many processes to execute, but one CPU OS time-multiplexes the CPU by operating context switching Between

More information

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1.

Coordination. Failures and Consensus. Consensus. Consensus. Overview. Properties for Correct Consensus. Variant I: Consensus (C) P 1. v 1. Coordination Failures and Consensus If the solution to availability and scalability is to decentralize and replicate functions and data, how do we coordinate the nodes? data consistency update propagation

More information

Searching for Black Holes in Subways

Searching for Black Holes in Subways Searching for Black Holes in Subways Paola Flocchini Matthew Kellett Peter C. Mason Nicola Santoro Abstract Current mobile agent algorithms for mapping faults in computer networks assume that the network

More information

Time is an important issue in DS

Time is an important issue in DS Chapter 0: Time and Global States Introduction Clocks,events and process states Synchronizing physical clocks Logical time and logical clocks Global states Distributed debugging Summary Time is an important

More information

Wait-Free Dining Under Eventual Weak Exclusion

Wait-Free Dining Under Eventual Weak Exclusion Wait-Free Dining Under Eventual Weak Exclusion Scott M. Pike, Yantao Song, and Srikanth Sastry Texas A&M University Department of Computer Science College Station, TX 77843-3112, USA {pike,yantao,sastry}@cs.tamu.edu

More information

Course : Algebraic Combinatorics

Course : Algebraic Combinatorics Course 18.312: Algebraic Combinatorics Lecture Notes #29-31 Addendum by Gregg Musiker April 24th - 29th, 2009 The following material can be found in several sources including Sections 14.9 14.13 of Algebraic

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Organization Prof. Dr. Joel Greenyer April 11, 2013 Organization Lecture: Thursdays, 10:15 11:45, F 128 Tutorial: Thursdays, 13:00 13:45, G 323 first

More information

MOST OF the published research on control of discreteevent

MOST OF the published research on control of discreteevent IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 43, NO. 1, JANUARY 1998 3 Discrete-Event Control of Nondeterministic Systems Michael Heymann and Feng Lin, Member, IEEE Abstract Nondeterminism in discrete-event

More information

Johns Hopkins Math Tournament Proof Round: Automata

Johns Hopkins Math Tournament Proof Round: Automata Johns Hopkins Math Tournament 2018 Proof Round: Automata February 9, 2019 Problem Points Score 1 10 2 5 3 10 4 20 5 20 6 15 7 20 Total 100 Instructions The exam is worth 100 points; each part s point value

More information

Limiting Behavior of Markov Chains with Eager Attractors

Limiting Behavior of Markov Chains with Eager Attractors Limiting Behavior of Markov Chains with Eager Attractors Parosh Aziz Abdulla Uppsala University, Sweden. parosh@it.uu.se Noomene Ben Henda Uppsala University, Sweden. Noomene.BenHenda@it.uu.se Sven Sandberg

More information

A Formal Analysis of a Dynamic Distributed Spanning Tree Algorithm

A Formal Analysis of a Dynamic Distributed Spanning Tree Algorithm A Formal Analysis of a Dynamic Distributed Spanning Tree Algorithm Arjan J. Mooij and Wieger Wesselink Technische Universiteit Eindhoven P.O. Box 513, 5600 MB Eindhoven, The Netherlands Abstract. We analyze

More information

Figure 1. Solution to dining-philosophers with malicious crashes

Figure 1. Solution to dining-philosophers with malicious crashes Dining Philosophers that Tolerate Malicious Crashes Mikhail Nesterenko Λ Department of Computer Science, Kent State University, Kent, OH 44242, mikhail@cs.kent.edu Anish Arora y Dept. of Computer and Information

More information

Sanjit A. Seshia EECS, UC Berkeley

Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Explicit-State Model Checking: Additional Material Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: G. Holzmann Checking if M satisfies : Steps 1. Compute Buchi

More information

Directed Topology and Concurrency Theory.

Directed Topology and Concurrency Theory. Directed Topology and Concurrency Theory. Lisbeth Fajstrup Department of Mathematics alborg University Denmark Sapporo 2017 Directed Topology/Concurrency Take home message: Models of concurrency geometry/topology

More information

Time Synchronization

Time Synchronization Massachusetts Institute of Technology Lecture 7 6.895: Advanced Distributed Algorithms March 6, 2006 Professor Nancy Lynch Time Synchronization Readings: Fan, Lynch. Gradient clock synchronization Attiya,

More information

Deadlock. CSE 2431: Introduction to Operating Systems Reading: Chap. 7, [OSC]

Deadlock. CSE 2431: Introduction to Operating Systems Reading: Chap. 7, [OSC] Deadlock CSE 2431: Introduction to Operating Systems Reading: Chap. 7, [OSC] 1 Outline Resources Deadlock Deadlock Prevention Deadlock Avoidance Deadlock Detection Deadlock Recovery 2 Review: Synchronization

More information

Scheduling and Analysis of Real-Time OpenMP Task Systems with Tied Tasks

Scheduling and Analysis of Real-Time OpenMP Task Systems with Tied Tasks Scheduling and Analysis of Real-Time OpenMP Task Systems with Tied Tasks Jinghao Sun 1,2, Nan Guan 2, Yang Wang 1, Qingqing He 1 and Wang Yi 1,3 1 Northeastern University, China 2 The Hong Kong Polytechnic

More information

Status of Remote Observation / Service Observation

Status of Remote Observation / Service Observation Status of Remote Observation / Service Observation Junichi Noumaru Subaru Telescope National Astronomical Observatory of Japan Outline How many service observation has been done Issues on service observation

More information

Lock Inference for Atomic Sections

Lock Inference for Atomic Sections Lock Inference for Atomic Sections Michael Hicks University of Maryland, College Park mwh@cs.umd.edu Jeffrey S. Foster University of Maryland, College Park jfoster@cs.umd.edu Polyvios Pratikakis University

More information

Program Analysis Part I : Sequential Programs

Program Analysis Part I : Sequential Programs Program Analysis Part I : Sequential Programs IN5170/IN9170 Models of concurrency Program Analysis, lecture 5 Fall 2018 26. 9. 2018 2 / 44 Program correctness Is my program correct? Central question for

More information

CS 4407 Algorithms Lecture: Shortest Path Algorithms

CS 4407 Algorithms Lecture: Shortest Path Algorithms CS 440 Algorithms Lecture: Shortest Path Algorithms Prof. Gregory Provan Department of Computer Science University College Cork 1 Outline Shortest Path Problem General Lemmas and Theorems. Algorithms Bellman-Ford

More information

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach EDA045F: Program Analysis LECTURE 10: TYPES 1 Christoph Reichenbach In the last lecture... Performance Counters Challenges in Dynamic Performance Analysis Taint Analysis Binary Instrumentation 2 / 44 Types

More information

Real-Time Scheduling. Real Time Operating Systems and Middleware. Luca Abeni

Real-Time Scheduling. Real Time Operating Systems and Middleware. Luca Abeni Real Time Operating Systems and Middleware Luca Abeni luca.abeni@unitn.it Definitions Algorithm logical procedure used to solve a problem Program formal description of an algorithm, using a programming

More information

AGREEMENT PROBLEMS (1) Agreement problems arise in many practical applications:

AGREEMENT PROBLEMS (1) Agreement problems arise in many practical applications: AGREEMENT PROBLEMS (1) AGREEMENT PROBLEMS Agreement problems arise in many practical applications: agreement on whether to commit or abort the results of a distributed atomic action (e.g. database transaction)

More information

Part I. Principles and Techniques

Part I. Principles and Techniques Introduction to Formal Methods Part I. Principles and Techniques Lecturer: JUNBEOM YOO jbyoo@konkuk.ac.kr Introduction Text System and Software Verification : Model-Checking Techniques and Tools In this

More information

Asynchronous Communication 2

Asynchronous Communication 2 Asynchronous Communication 2 INF4140 22.11.12 Lecture 11 INF4140 (22.11.12) Asynchronous Communication 2 Lecture 11 1 / 37 Overview: Last time semantics: histories and trace sets specification: invariants

More information

Lecture 4: Process Management

Lecture 4: Process Management Lecture 4: Process Management Process Revisited 1. What do we know so far about Linux on X-86? X-86 architecture supports both segmentation and paging. 48-bit logical address goes through the segmentation

More information

Axiomatic Semantics: Verification Conditions. Review of Soundness of Axiomatic Semantics. Questions? Announcements

Axiomatic Semantics: Verification Conditions. Review of Soundness of Axiomatic Semantics. Questions? Announcements Axiomatic Semantics: Verification Conditions Meeting 18, CSCI 5535, Spring 2010 Announcements Homework 6 is due tonight Today s forum: papers on automated testing using symbolic execution Anyone looking

More information

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML)

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML) Where are we? Systeme hoher Sicherheit und Qualität Universität Bremen, WS 2017/2018 Lecture 05: High-Level Design with SysML Christoph Lüth, Dieter Hutter, Jan Peleska 01: Concepts of Quality 02: Legal

More information

CPU scheduling. CPU Scheduling

CPU scheduling. CPU Scheduling EECS 3221 Operating System Fundamentals No.4 CPU scheduling Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University CPU Scheduling CPU scheduling is the basis of multiprogramming

More information

Lecture 17: Floyd-Hoare Logic for Partial Correctness

Lecture 17: Floyd-Hoare Logic for Partial Correctness Lecture 17: Floyd-Hoare Logic for Partial Correctness Aims: To look at the following inference rules Page 1 of 9 sequence; assignment and consequence. 17.1. The Deduction System for Partial Correctness

More information

Unit: Blocking Synchronization Clocks, v0.3 Vijay Saraswat

Unit: Blocking Synchronization Clocks, v0.3 Vijay Saraswat Unit: Blocking Synchronization Clocks, v0.3 Vijay Saraswat This lecture discusses X10 clocks. For reference material please look at the chapter on Clocks in []. 1 Motivation The central idea underlying

More information

Rendezvous and Election of Mobile Agents: Impact of Sense of Direction

Rendezvous and Election of Mobile Agents: Impact of Sense of Direction Rendezvous and Election of Mobile Agents: Impact of Sense of Direction Lali Barrière Paola Flocchini Pierre Fraigniaud Nicola Santoro Abstract Consider a collection of r identical asynchronous mobile agents

More information