- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 1. Synchronous vs. asynchronous languages.

Slides:



Advertisements
Similar presentations
FSMs & message passing: SDL
Advertisements

Technische universität dortmund fakultät für informatik informatik 12 Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Fakultät für informatik informatik 12 technische universität dortmund Specifications and Modeling Peter Marwedel TU Dortmund, Informatik 12 Graphics: ©
Fakultät für informatik informatik 12 technische universität dortmund SDL Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte, Gesine.
Communicating finite state machines
Embedded System, A Brief Introduction
Fakultät für informatik informatik 12 technische universität dortmund Finite state machines + message passing: SDL Peter Marwedel TU Dortmund, Informatik.
Parallel Processing & Parallel Algorithm May 8, 2003 B4 Yuuki Horita.
Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
Network Protocols Dr. Eng Amr T. Abdel-Hamid NETW 703 Winter 2006 Finite State Machines (FSMs)
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
Concurrency: Mutual Exclusion and Synchronization Why we need Mutual Exclusion? Classical examples: Bank Transactions:Read Account (A); Compute A = A +
Timing-Based Communication Refinement for CFSMs Presenters:Heloise Hse, Irene Po Mentors:Jonathan Martin, Marco Sgroi Professor:Alberto Sangiovanni-Vincentelli.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Universität Dortmund Hoofdstuk 2 Systeemspecificatietechnieken 2.2 Specificatietalen Prof. dr.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Communication in Distributed Systems –Part 2
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Asynchronous Message Passing EE 524/CS 561 Wanliang Ma 03/08/2000.
Mahapatra-A&M-Sprong'021 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
A. Frank - P. Weisberg Operating Systems Introduction to Cooperating Processes.
1/26/2007CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Sequential Networks Two major classes of Sequential Circuits 1.Fundamental Mode – A sequential circuit where: Only one input is allowed to change at any.
Ch.2 Part A: Requirements, State Charts EECE **** Embedded System Design.
- 1 - Embedded Systems—State charts Specifications.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Specifications.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
Comparative Programming Languages hussein suleman uct csc304s 2003.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication in Client-Server.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
StateCharts Peter Marwedel Informatik 12 Univ. Dortmund Germany.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
Chapter 3 Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Jan 19, 2005 Chapter 3: Processes Process Concept.
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
Processes. Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication.
CS212: OPERATING SYSTEM Lecture 2: Process 1. Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Ch.2 Part E: VHDL, SystemC EECE **** Embedded System Design.
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-4 Process Communication Department of Computer Science and Software.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Operations on Processes Cooperating.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
CS533 – Spring Jeanie M. Schwenk Experiences and Processes and Monitors with Mesa What is Mesa? “Mesa is a strongly typed, block structured programming.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
 Process Concept  Process Scheduling  Operations on Processes  Cooperating Processes  Interprocess Communication  Communication in Client-Server.
Developing a Framework for Simulation, Verification and Testing of SDL Specifications Olga Shumsky Lawrence Henschen Northwestern University
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
1 An SDL Tutorial Two primary elements: –Structure –Identifies the various components of the system, and the communication paths among them. –Components:
1 Advanced Embedded Systems Lecture 3 Specification Languages.
Technische universität dortmund fakultät für informatik informatik 12 Finite state machines & message passing: SDL Peter Marwedel TU Dortmund, Informatik.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Lecture 2 Specification and Requirement Analysis of Embedded System.
Protocol Modeling Eng. Ahmed Badr Tutorial 2 Theoretical
Chapter 3: Process Concept
Computer Engg, IIT(BHU)
Applied Operating System Concepts
Embedded System Design Specifications and Modeling
Chapter 4: Processes Process Concept Process Scheduling
Submission Title: [Add name of submission]
Recap OS manages and arbitrates resources
Operating System Concepts
Specifications and Modeling
Presentation transcript:

- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 1. Synchronous vs. asynchronous languages (1) Description of several processes in many languages non- deterministic: The order in which executable tasks are executed is not specified (may affect result). Synchronous languages: based on automata models. „Synchronous languages aim at providing high level, modular constructs, to make the design of such an automaton easier [Halbwachs]. Synchronous languages describe concurrently operating automata. „.. when automata are composed in parallel, a transition of the product is made of the "simultaneous" transitions of all of them“. Description of several processes in many languages non- deterministic: The order in which executable tasks are executed is not specified (may affect result). Synchronous languages: based on automata models. „Synchronous languages aim at providing high level, modular constructs, to make the design of such an automaton easier [Halbwachs]. Synchronous languages describe concurrently operating automata. „.. when automata are composed in parallel, a transition of the product is made of the "simultaneous" transitions of all of them“.

- 2 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Synchronous languages implicitly assume the presence of a (global) clock. Each clock tick, all inputs are considered, new outputs and states are calculated and then the transitions are made. This requires a broadcast mechanism for all parts of the model. Idealistic view of concurrency. Has the advantage of guaranteeing deterministic behavior.  StateCharts is a synchronous language. Synchronous languages implicitly assume the presence of a (global) clock. Each clock tick, all inputs are considered, new outputs and states are calculated and then the transitions are made. This requires a broadcast mechanism for all parts of the model. Idealistic view of concurrency. Has the advantage of guaranteeing deterministic behavior.  StateCharts is a synchronous language. Some general properties of languages 1. Synchronous vs. asynchronous languages (2)

- 3 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 2. Properties of processes (1) Number of processes static; dynamic (dynamically changed hardware architecture?) Nesting: –Nested declaration of processes process { process { process { }}} –or all declared at the same level process { … } process { … } process { … } Number of processes static; dynamic (dynamically changed hardware architecture?) Nesting: –Nested declaration of processes process { process { process { }}} –or all declared at the same level process { … } process { … } process { … }

- 4 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 2. Properties of processes (2) Different techniques for process creation –Elaboration in the source (c.f. ADA, below) declare process P1 … –explicit fork and join (c.f. Unix) id = fork(); –process creation calls id = create_process(P1);  StateCharts comprises a static number of processes, nested declaration of processes, and process creation through elaboration in the source. Different techniques for process creation –Elaboration in the source (c.f. ADA, below) declare process P1 … –explicit fork and join (c.f. Unix) id = fork(); –process creation calls id = create_process(P1);  StateCharts comprises a static number of processes, nested declaration of processes, and process creation through elaboration in the source.

- 5 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 3. Communication paradigms (1) Message passing –Non-blocking communication Sender does not have to wait until message has arrived; potential problem: buffer overflow Message passing –Non-blocking communication Sender does not have to wait until message has arrived; potential problem: buffer overflow … send () … receive () …

- 6 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 3. Communication paradigms (2) –Blocking communication, rendez-vous-based communication Sender will wait until receiver has received message … send () … receive () …

- 7 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 3. Communication paradigms (2) … send () … receive () … ack … –Extended rendez-vous Explicit acknowledge from receiver required. Receiver can do checking before sending acknowledgement.

- 8 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 3. Communication paradigms (4) Shared memory Variables accessible to several tasks Potential race conditions (  inconsistent results possible)  Critical sections = sections at which exclusive access to resource r (e.g. shared memory) must be guaranteed.  StateCharts uses shared memory for communication between processes. process a {.. P(S) //obtain lock.. // critical section V(S) //release lock } process b {.. P(S) //obtain lock.. // critical section V(S) //release lock } Race-free access to shared memory protected by S possible

- 9 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 4. Specifying timing (1) 4 types of timing specs required [Burns, 1990]: Means for delaying processes t ? t execute Measure elapsed time Check, how much time has elapsed since last call

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Some general properties of languages 4. Specifying timing (2) Possibility to specify timeouts Stay in a certain state a maximum time.  StateCharts comprises a mechanism for specifying timeouts. Other types of timing specs not supported. Methods for specifying deadlines Not available or in separate control file. t execute

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Properties of specification languages 5. Using non-standard I/O devices - Direct access to switches, displays etc; No protection required; OS can be much faster than for operating system with protection.  No support in standard StateCharts.  No particular OS support anyhow. Direct access to switches, displays etc; No protection required; OS can be much faster than for operating system with protection.  No support in standard StateCharts.  No particular OS support anyhow.

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund SDL Language designed for specification of distributed systems. Dates back to early 70s, Formal semantics defined in the late 80s, Defined by ITU (International Telecommunication Union): Z.100 recommendation in 1980 Updates in 1984, 1988, 1992, 1996 and 1999 Language designed for specification of distributed systems. Dates back to early 70s, Formal semantics defined in the late 80s, Defined by ITU (International Telecommunication Union): Z.100 recommendation in 1980 Updates in 1984, 1988, 1992, 1996 and 1999

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund SDL Provides textual and graphical formats to please all users, Just like StateCharts, it is based on the CFSM model of computation; each FSM is called a process, However, it uses message passing instead of shared memory for communications, SDL supports operations on data. Provides textual and graphical formats to please all users, Just like StateCharts, it is based on the CFSM model of computation; each FSM is called a process, However, it uses message passing instead of shared memory for communications, SDL supports operations on data.

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund SDL-representation of FSMs/processes output input state

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Operations on data Variables can be declared locally for processes. Their type can be predefined or defined in SDL itself. SDL supports abstract data types (ADTs). Examples: Variables can be declared locally for processes. Their type can be predefined or defined in SDL itself. SDL supports abstract data types (ADTs). Examples:

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Communication among SDL-FSMs Communication between FSMs (or „processes“) is based on message-passing, assuming a potentially indefinitely large FIFO-queue. Each process fetches next entry from FIFO, checks if input enables transition, if yes: transition takes place, if no: input is ignored (exception: SAVE- mechanism). Each process fetches next entry from FIFO, checks if input enables transition, if yes: transition takes place, if no: input is ignored (exception: SAVE- mechanism).

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Process interaction diagrams Interaction between processes can be described in process interaction diagrams (special case of block diagrams). In addition to processes, these diagrams contain channels and declarations of local signals. Example: Interaction between processes can be described in process interaction diagrams (special case of block diagrams). In addition to processes, these diagrams contain channels and declarations of local signals. Example:,

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Designation of recipients 1.Through process identifiers: Example: OFFSPRING represents identifiers of processes generated dynamically. 2.Explicitly: By including the channel name. 3.Implicitly: If signal names imply channel names (B  Sw1) 1.Through process identifiers: Example: OFFSPRING represents identifiers of processes generated dynamically. 2.Explicitly: By including the channel name. 3.Implicitly: If signal names imply channel names (B  Sw1) Counter Via Sw1 Counter TO OFFSPRING

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Hierarchy in SDL Process interaction diagrams can be included in blocks. The root block is called system. Processes cannot contain other processes, unlike in StateCharts.

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Timers Timers can be declared locally. Elapsed timers put signal into queue (not necessarily processed immediately). RESET also removes timer signal from queue. Timers can be declared locally. Elapsed timers put signal into queue (not necessarily processed immediately). RESET also removes timer signal from queue.

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Additional language elements SDL includes a number of additional language elements, like procedures creation and termination of processes advanced description of data SDL includes a number of additional language elements, like procedures creation and termination of processes advanced description of data

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Application: description of network protocols

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Larger example: vending machine Machine° selling pretzels, (potato) chips, cookies, and doughnuts: accepts nickels, dime, quarters, and half- dollar coins. Not a distributed application. ° [J.M. Bergé, O. Levia, J. Roullard: High-Level System Modeling, Kluwer Academic Publishers, 1995]

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Overall view of vending machine

Decode Requests p

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund ChipHandler no yes

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Versions and tools SDL-88 SDL-92: object orientation added SDL-96 SDL-2000: Extended graphical support; processes and blocks becoming replaced by agents. Tools for connecting to MSCs (see below) Tools for connecting to UML (see below) Tools for translation to CHILL. Information: SDL-88 SDL-92: object orientation added SDL-96 SDL-2000: Extended graphical support; processes and blocks becoming replaced by agents. Tools for connecting to MSCs (see below) Tools for connecting to UML (see below) Tools for translation to CHILL. Information:

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Evaluation Excellent for distributed applications (was used to specify ISDN), Commercial tools available from SINTEF, Telelogic, Cinderella (// Not necessarily deterministic (order, in which FSMs are reading input is unknown)  no synchronous language, Implementation requires bound for the maximum length of FIFOs; may be very difficult to compute, Timer concept adequate just for soft deadlines, Limited way of using hierarchies, Limited programming language support, No description of non-functional properties. Excellent for distributed applications (was used to specify ISDN), Commercial tools available from SINTEF, Telelogic, Cinderella (// Not necessarily deterministic (order, in which FSMs are reading input is unknown)  no synchronous language, Implementation requires bound for the maximum length of FIFOs; may be very difficult to compute, Timer concept adequate just for soft deadlines, Limited way of using hierarchies, Limited programming language support, No description of non-functional properties.

 P. Marwedel, Univ. Dortmund, Informatik 12, 2005/6 Universität Dortmund Summary General language properties –Synchronous vs. asynchronous languages –Properties of processes –Communication –Timing –Access to special I/O devices SDL –Representation of processes –Communication & block diagrams –Timers and other language elements –Example: Vending machine –Versions and evaluation General language properties –Synchronous vs. asynchronous languages –Properties of processes –Communication –Timing –Access to special I/O devices SDL –Representation of processes –Communication & block diagrams –Timers and other language elements –Example: Vending machine –Versions and evaluation