Unifying Theories Execution History Tony Hoare In honour of Manfred Broy 30 October 2009.

Slides:



Advertisements
Similar presentations
© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Advertisements

Parallel Processing & Parallel Algorithm May 8, 2003 B4 Yuuki Horita.
1 Written By: Adi Omari (Revised and corrected in 2012 by others) Memory models CDP Tutorial 7.
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
D u k e S y s t e m s Time, clocks, and consistency and the JMM Jeff Chase Duke University.
Tracelets: a Model for the Laws of Concurrent Programming Tony Hoare OxfordFeb 2012.
1 Reversibility for Recoverability Ivan Lanese Computer Science Department FOCUS research group University of Bologna/INRIA Bologna, Italy.
Modeling Main issues: What do we want to build How do we write this down ©2008 John Wiley & Sons Ltd. vliet.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Dependable Composition of Web Services and Process Calculi Manuel Mazzara Newcastle University.
The P-Calculus Supratik Mukhopadhyay PEMWS-2 April 6 th 2011.
Ordering and Consistent Cuts Presented By Biswanath Panda.
SE 555 Software Requirements & Specification 1 Activity Diagrams.
Slides for Chapter 10: Time and Global State
Concurrency CS 510: Programming Languages David Walker.
Chapter 8: Modelling Interactions and Behaviour
Technische Universität München Institut für Informatik D München, Germany Realizability of System Interface Specifications Manfred Broy.
CS533 - Concepts of Operating Systems
SE-565 Software System Requirements More UML Diagrams.
Unified Modeling Language
Advances in Language Design
Computer Architecture Computational Models Ola Flygt V ä xj ö University
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Concurrency Programming Chapter 2. The Role of Abstraction Scientific descriptions of the world are based on abstractions. A living animal is a system.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 21. Review ANALYSIS PHASE (OBJECT ORIENTED DESIGN) Functional Modeling – Use case Diagram Description.
Multi-core systems System Architecture COMP25212 Daniel Goodman Advanced Processor Technologies Group.
Chapter 5 – System Modeling
Charts and nets: States, Messages, and Events Tony Hoare In honour of David Harel ViennaJuly 2014.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Extending Trace Models Tony Hoare Ian Wehrman. Traces Trace: set of events + dependency relation – an execution of a program tr.
Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation.
Chapter 12: Design Phase n 12.1 Design and Abstraction n 12.2 Action-Oriented Design n 12.3 Data Flow Analysis n Data Flow Analysis Example n
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
Seminar on Component-based Software Engineering Component Coordination Nadia Ramjiawan LIACS - Leiden University Fall 2005.
Internal Talk, Oct Executable Specifications using Message Sequence Charts Abhik Roychoudhury School of Computing National University of Singapore.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Information System Design IT60105
Model 3: Message-Passing Text We saw –Diagrams –Shared-variables text Now –Message-passing text (like CSP)
Introduction Object oriented design is a method where developers think in terms of objects instead of procedures or functions. SA/SD approach is based.
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Laws of concurrent design Tony Hoare Microsoft ResearchCambridge FMCAD October.
Consider the program fragment below left. Assume that the program containing this fragment executes t1() and t2() on separate threads running on separate.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
Jini Architecture Introduction System Overview An Example.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Threaded Programming Lecture 1: Concepts. 2 Overview Shared memory systems Basic Concepts in Threaded Programming.
 Activity diagram is basically a flow chart to represent the flow from one activity to another activity.
1 Chapter 11 Global Properties (Distributed Termination)
Introduction to distributed systems description relation to practice variables and communication primitives instructions states, actions and programs synchrony.
Business Process Execution Language (BPEL) Pınar Tekin.
ACTIVITY DIAGRAMS 《UML面向对象建模基础》.
Operating Systems CMPSC 473
Unified Modeling Language
Visit for more Learning Resources
CS533 Concepts of Operating Systems
Intro to Processes CSSE 332 Operating Systems
Business System Development
Activity Diagrams.
EE 4xx: Computer Architecture and Performance Programming
Abstraction.
Slides for Chapter 11: Time and Global State
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Appendix 3 Object-Oriented Analysis and Design
Jenhui Chen Office number:
Slides for Chapter 14: Time and Global States
Presentation transcript:

Unifying Theories Execution History Tony Hoare In honour of Manfred Broy 30 October 2009

Manfred Broy and Tony Hoare at Marktoberdorf.

Unifying… Memory – shared/private, weakly/strongly consistent Communication – synchronised/buffered, reliable/unreliable Resource management – dynamic/nested, disposed/collected

Unifying… Sequential programming – C, Java, C#,... Process algebras and calculi – stream processing functions – CCS, CSP, pi Shared memory, threads – fine-grained, coarse-grained, transactions – weakly consistent memory

Labelled graphs Trace semantics(Mazurkiewicz) Regular expressions(Kleene) Causal nets(Petri) Event structure configurations(Winskel) Message Sequence Charts(UML) INSIGHT! They are all labeled graphs

A labeled Graph E: a set of nodes (events) A: a set of arrows (denoting data flow) L: a set of labels (to be determined) source, target: A -> E label: A -> L (labelling the arrow) label: E -> L (labelling the events)

Program Execution is recorded as a trace of all events that have occurred – drawn as boxes all dependencies between them – drawn as arrows source target – the target could not occur before source

Program Execution is recorded as a trace of: all events that have occurred – drawn as boxes – with labels naming the executed command all dependencies between them – drawn as arrows source target – with labels naming resource.value, etc. x := 3 x.3 x := 3x = 3

A Sequential Resource begin end next

Implementation begin end next allocated globally/on stack/in heap/… disposed from stack/by command/by collector/by OS

Fork fanout all arrows of the graph have the same source

Join fanin all arrows of the graph have the same target

Shared Resource faninfanout begin end

Publication faninfanout publish next

Assignment fanin fanout := 3 := 7 next =3

A variable begin end next := fanin fanout = = ==

A variable begin end next := fanin fanout = = ==

A variable begin end next := fanin fanout = = ==

A variable begin end next := fanin fanout = = ==

A variable begin end next := fanin fanout = = ==

A variable begin end next := fanin fanout = = ==

A variable begin end next := fanin fanout = = ==

Unassigned fetch begin end next := fanin fanout fanin fanout

Communication !!! ? ?? send

Ordering next !!! ? ?? send

Channel next !!! ? ?? end begin next send

Single-buffered Channel next !!! ? ?? end begin next send sync

Synchronised next !!! ? ?? end begin next send sync

Lossy channel next !!! ? ? send

Stuttering channel next !! ? ?? send

Fraudulent channel next !! ? ?? send

Overtaking next !! ?? send

Reliable channel reliable =  loss &  fraud &  stutter &  merge &  overtaking

Threads fork begin end next begin next join begin next end fork join

An Atomic Assignment x := x + y x = 3 y= 4 x := 7

An Atomic Assignment x := x + y x = 3 y= 4 x := 7 x.fanout.3x.fanin y.fanout.4 y.fanin x.next x.fanout.7 x.fanin t.next

An Atomic Assignment x := x + y x = 3 y= 4 x := 7 x.fanout.3x.fanin y.fanout.4 y.fanin x.next x.fanout.7 x.fanin t.next

Events and atomic actions Each occurrence of an event in the trace of program execution belongs to the trace of exactly one resource (thread, variable, channel,…) Atomic actions are groups of synchronised events, including exactly one from the thread which invoked the action, and one (or more) from every resource used by it.

v.fanout v:= 4 v := 3v:= 6 v.next v.fanin v.fanout v.fanin =3 = 4= 6 v.next A variable (fully labelled) v.fanout

t.next v:= 4 v := 3v:= 6 thread t interfering thread v.next =3 = 4= 6 v.next A shared variable v.next

Weakly consistent memory as implemented in multi-core architecture, is even more complicated to define … and more still to use! A common architecture is TSO

Total Store Ordering :=4 sync :=3 :=6global memory sync

Local memory next val next :=4 sync :=3 :=6 := 4:= 3:= 6 local memory global memory sync

Local memory access next val next :=4 sync :=3 :=6 := 4:= 3:= 6 local memory global memory = 3= 4= 6 local memory sync

next val next :=4 sync :=3 :=6 := 4:= 3:= 6 local memory global memory other thread :=4 = 3= 4= 6 local memory sync :=3

Memory Barrier next val next sync :=4 :=3 :=6 := 4:= 3:= 6bar local memory global memory

Summary Dependency and data flow are a primitive concepts adequate to describe the dynamic behaviour of many kinds of computing resource Labelled graphs provide a general framework adequate for a unifying theory of dependency