Finite state machines & message passing: SDL

Slides:



Advertisements
Ähnliche Präsentationen
Finding the Pattern You Need: The Design Pattern Intent Ontology
Advertisements

E-Solutions mySchoeller.com for Felix Schoeller Imaging
Z-Transformation Die bilaterale Z-Transformation eines Signals x[n] ist die formale Reihe X(z): wobei n alle ganzen Zahlen durchläuft und z, im Allgemeinen,
P. Marwedel Informatik 12, U. Dortmund
R. Zankl – Ch. Oelschlegel – M. Schüler – M. Karg – H. Obermayer R. Gottanka – F. Rösch – P. Keidler – A. Spangler th Expert Meeting Business.
Die ZBW ist Mitglied der Leibniz-Gemeinschaft Copyright © ZBW 2010 Seite 1 Potenziale semantischer Technologien für die Bibliothek der Zukunft Klaus Tochtermann.
1 | R. Steinbrecher | IMK-IFU | KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universität Karlsruhe (TH) Natural Sources SNAP11.
Multi electron atoms Atoms with Z>1 contain >1 electron. This changes the atomic structure considerably because in addition to the electron-nucleus interaction,
Informatik 12, TU Dortmund
fakultät für informatik informatik 12 technische universität dortmund Test Peter Marwedel TU Dortmund Informatik 12 Germany 2009/01/17 Graphics: © Alexandra.
Embedded & Real-time Operating Systems
Fakultät für informatik informatik 12 technische universität dortmund Optimizations Peter Marwedel TU Dortmund Informatik 12 Germany 2009/01/17 Graphics:
fakultät für informatik informatik 12 technische universität dortmund Optimizations Peter Marwedel TU Dortmund Informatik 12 Germany 2009/01/10 Graphics:
Fakultät für informatik informatik 12 technische universität dortmund Mapping of Applications to Platforms Peter Marwedel TU Dortmund, Informatik 12 Germany.
Fakultät für informatik informatik 12 technische universität dortmund Optimizations Peter Marwedel TU Dortmund Informatik 12 Germany 2010/01/13 Graphics:
Fakultät für informatik informatik 12 technische universität dortmund Universität Dortmund Middleware Peter Marwedel TU Dortmund, Informatik 12 Germany.
Fakultät für informatik informatik 12 technische universität dortmund Specifications Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte,
Peter Marwedel TU Dortmund, Informatik 12
Fakultät für informatik informatik 12 technische universität dortmund Hardware/Software Partitioning Peter Marwedel Informatik 12 TU Dortmund Germany Chapter.
Fakult ä t f ü r informatik informatik 12 technische universit ä t dortmund Data flow models Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra.
Wenn…… the conditional. Using the conditional tense The conditional tense is used to talk about something that happens only after something else happened.
Wozu die Autokorrelationsfunktion?
Hier wird Wissen Wirklichkeit Computer Architecture – Part 10 – page 1 of 31 – Prof. Dr. Uwe Brinkschulte, Prof. Dr. Klaus Waldschmidt Part 10 Thread and.
Hier wird Wissen Wirklichkeit Computer Architecture – Part 5 – page 1 of 25 – Prof. Dr. Uwe Brinkschulte, M.Sc. Benjamin Betting Part 5 Fundamentals in.
Lancing: What is the future? Lutz Heinemann Profil Institute for Clinical Research, San Diego, US Profil Institut für Stoffwechselforschung, Neuss Science.
Three minutes presentation I ArbeitsschritteW Seminar I-Prax: Inhaltserschließung visueller Medien, Spree WS 2010/2011 Giving directions.
Thomas Herrmann Software - Ergonomie bei interaktiven Medien Step 6: Ein/ Ausgabe Instrumente (Device-based controls) Trackball. Joystick.
CCNA Exploration Network Fundamentals
Institut für Umweltphysik/Fernerkundung Physik/Elektrotechnik Fachbereich 1 Pointing Meeting Nov 2006 S. Noël IFE/IUP Elevation and Azimuth Jumps during.
1 IDA, TU Braunschweig SuReal – Sicherheitsgarantien unter Realzeitanforderungen Jonas Rox Braunschweig, Jonas Rox Braunschweig,
Adjektive Endungen von Frau Templeton.
Institut AIFB, Universität Karlsruhe (TH) Forschungsuniversität gegründet 1825 Towards Automatic Composition of Processes based on Semantic.
Sanjay Patil Standards Architect – SAP AG April 2008
| DC-IAP/SVC3 | © Bosch Rexroth Pneumatics GmbH This document, as well as the data, specifications and other information set forth in.
BAS5SE | Fachhochschule Hagenberg | Daniel Khan | S SPR5 MVC Plugin Development SPR6P.
Alp-Water-Scarce Water Management Strategies against Water Scarcity in the Alps 4 th General Meeting Cambery, 21 st September 2010 Water Scarcity Warning.
You need to use your mouse to see this presentation © Heidi Behrens.
Department of Computer Science Homepage HTML Preprocessor Perl Database Revision Control System © 1998, Leonhard Jaschke, Institut für Wissenschaftliches.
INTAKT- Interkulturelle Berufsfelderkundungen als ausbildungsbezogene Lerneinheiten in berufsqualifizierenden Auslandspraktika DE/10/LLP-LdV/TOI/
Guten Morgen!.
Verben Wiederholung Deutsch III Notizen.
Kölner Karneval By Logan Mack
Staatsballett Berlin Ein Verbesserungskonzept für den Social- Media Auftritt Your picture here.
Impairments in Polarization-Multiplexed DWDM Channels due to Cross- Polarization Modulation Marcus Winter Christian-Alexander Bunge Klaus Petermann Hochfrequenztechnik-Photonik.
Einführung Bild und Erkenntnis Einige Probleme Fazit Eberhard Karls Universität Tübingen Philosophische Fakultät Institut für Medienwissenschaft Epistemic.
Ein Projekt des Technischen Jugendfreizeit- und Bildungsvereins (tjfbv) e.V. kommunizieren.de Blended Learning for people with disabilities.
Image Processing and Analysis Introduction. How do we see things ?
Cross-Polarization Modulation in DWDM Systems
Welcome Instructor: Dominik Dwight Zethmeier
External Labels – The rules For all external labels the following rules apply (external labels are all labels which are not inside of a shape) - all labels.
Relativpronomen / Relativsätze:
© Boardworks Ltd of 8 Time Manner Place © Boardworks Ltd of 8 This icon indicates that the slide contains activities created in Flash. These.
By: Jade Bowerman. German numbers are quite a bit like our own. You start with one through ten and then you add 20, 30, 40 or 50 to them. For time you.
Alltagsleben Treffpunkt Deutsch Sixth Edition
Adjectiv Endungen Lite: Adjective following articles and pre-ceeding nouns. Colors and Clothes.
Relativpronomen / Relativsätze:
AVL-Trees (according to Adelson-Velskii & Landis, 1962) In normal search trees, the complexity of find, insert and delete operations in search.
Sentence Structure Subject and verb are always together. Subject and verb are always together. Subject and verb must agree Subject and verb must agree.
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universität Karlsruhe (TH) Vorlesung Knowledge Discovery - Institut AIFB Tempus fugit Towards.
1 Intern | ST-IN/PRM-EU | | © Robert Bosch GmbH Alle Rechte vorbehalten, auch bzgl. jeder Verfügung, Verwertung, Reproduktion, Bearbeitung,
Fakultät für informatik informatik 12 technische universität dortmund Standard Optimization Techniques 2010/12/20 Peter Marwedel TU Dortmund, Informatik.
Fakultät für informatik informatik 12 technische universität dortmund Memory architecture description languages - Session 20 - Peter Marwedel TU Dortmund.
1 Stevens Direct Scaling Methods and the Uniqueness Problem: Empirical Evaluation of an Axiom fundamental to Interval Scale Level.
THE PERFECT TENSE IN GERMAN
Lehrstuhl für Waldbau, Technische Universität MünchenBudapest, 10./11. December 2006 WP 1 Status (TUM) Bernhard Felbermeier.
Selectivity in the German Mobility Panel Tobias Kuhnimhof Institute for Transport Studies, University of Karlsruhe Paris, May 20th, 2005.
Technische Universität München 1 CADUI' June FUNDP Namur G B I The FUSE-System: an Integrated User Interface Design Environment Frank Lonczewski.
TUM in CrossGrid Role and Contribution Fakultät für Informatik der Technischen Universität München Informatik X: Rechnertechnik und Rechnerorganisation.
Institut für Nachrichtentechnik U. Reimers Technische Universität Braunschweig The MultiMedia Home Platform (MHP): Hype or Reality ?
Technische Universität München Fakultät für Informatik Computer Graphics SS 2014 Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
 Präsentation transkript:

Finite state machines & message passing: SDL Graphics: © Alexandra Nolte, Gesine Marwedel, 2003 Peter Marwedel TU Dortmund, Informatik 12 These slides use Microsoft clip arts. Microsoft copyright restrictions apply. 2011/11/02

Context Communication/ Computation Shared memory Message passing blocking Non-blocking FSM StateCharts SDL SDL used here as a (prominent) example of a model of computation based on asynchronous message passing communication.  appropriate also for distributed systems

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

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.

SDL-representation of FSMs/processes state input output

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).

Determinate? Let tokens be arriving at FIFO at the same time: Order in which they are stored, is unknown: All orders are legal: simulators can show different behaviors for the same input, all of which are correct.

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:

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: B ,

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.

Timers Timers can be declared locally. Elapsed timers put signal into queue (not necessarily processed immedia-tely). RESET removes timer (also from FIFO-queue).

Additional language elements SDL includes a number of additional language elements, like procedures creation and termination of processes advanced description of data More features added for SDL-2000 (not well accepted)

Application: description of network protocols

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]

Overall view of vending machine

p Decode Requests

ChipHandler no yes yes no

Evaluation & summary FSM model for the components, Non-blocking message passing for communication, Implementation requires bound for the maximum length of FIFOs; may be very difficult to compute, Excellent for distributed applications (used for ISDN), Commercial tools available (see http://www.sdl-forum.org) Not necessarily determinate Timer concept adequate just for soft deadlines, Limited way of using hierarchies, Limited programming language support, No description of non-functional properties, Examples: small network + vending machine Becoming less popular

Peter Marwedel TU Dortmund, Informatik 12 Data flow models Peter Marwedel TU Dortmund, Informatik 12 Graphics: © Alexandra Nolte, Gesine Marwedel, 2003 2011/11/02 These slides use Microsoft clip arts. Microsoft copyright restrictions apply.

Data flow as a “natural” model of applications Example: Video on demand system www.ece.ubc.ca/~irenek/techpaps/vod/vod.html

Data flow modeling Definition: Data flow modeling is … “the process of identifying, modeling and documenting how data moves around an information system. Data flow modeling examines processes (activities that transform data from one form to another), data stores (the holding areas for data), external entities (what sends data into a system or receives data from a system, and data flows (routes by which data can flow)”. [Wikipedia: Structured systems analysis and design method. http://en.wikipedia.org/wiki/Structured Systems Analysis and Design Methodology, 2010 (formatting added)].

Models of computation considered in this course Communication/ local computations Shared memory Message passing Synchronous | Asynchronous Undefined components Plain text, use cases | (Message) sequence charts Communicating finite state machines StateCharts SDL Data flow (Not useful) Kahn networks, SDF Petri nets C/E nets, P/T nets, … Discrete event (DE) model VHDL, Verilog, SystemC, … Only experimental systems, e.g. distributed DE in Ptolemy Von Neumann model C, C++, Java C, C++, Java with libraries CSP, ADA |

Kahn process networks Each component is a program/task/process, not an FSM Communication is by FIFOs; no overflow considered  writes never have to wait,  reads wait if FIFO is empty. Only one sender and one receiver per FIFO  no SDL-like conflicts at FIFOs

© R. Gupta (UCSD), W. Wolf (Princeton), 2003 Example Process f(in int u, in int v, out int w){ int i; bool b = true; for (;;) { i= b ? wait(u) : wait(v); //wait returns next token in FIFO, waits if empty send (i,w); //writes a token into a FIFO w/o blocking b = !b; } © R. Gupta (UCSD), W. Wolf (Princeton), 2003 levi animation

Properties of Kahn process networks Communication is only via channels; Mapping from 1 input channel to 1 output channel; Channels transmit information within an unpredictable but finite amount of time; In general, execution times are unknown.

Key beauty of KPNs A process cannot check whether data is available before attempting a read. A process cannot wait for data for more than one port at a time. Therefore, the order of reads depends only on data, not on the arrival time. Therefore, Kahn process networks are determinate (!); for a given input, the result will always the same, regardless of the speed of the nodes. Many applications in embedded system design: Any combination of fast and slow simulation & hardware prototypes always gives the same result.

Computational power and analyzability KPNs are Turing-complete (anything which can be computed can be computed by a KPN) It is a challenge to schedule KPNs without accumulating tokens KPNs are computationally powerful, but difficult to analyze (e.g. what’s the maximum buffer size?) Number of processes is static (cannot change)

More information about KPNs http://ls12-www.cs.tu-dortmund.de/teaching/download/ levi/index.html: Animation http://en.wikipedia.org/wiki/Kahn_process_networks See also S. Edwards: http://www.cs.columbia.edu/ ~sedwards/classes/2001/w4995-02/presentations/dataflow.ppt

Synchronous data flow (SDF). Less computationally powerful, but easier to analyze: Synchronous data flow (SDF). Synchronous = global clock controlling “firing” of nodes Again using asynchronous message passing = tasks do not have to wait until output is accepted.

(Homogeneous-) Synchronous data flow (SDF) Nodes are called actors. Actors are ready, if the necessary number of input tokens exists and if enough buffer space at the output exists Ready actors can fire (be executed). Execution takes a fixed, known time. Actually, this is a case of homogeneous synchronous data flow models (HSDF): # of tokens per firing the same. 

(Non-homogeneous-) Synchronous data flow (SDF) (1) In the general case, a number of tokens can be produced/ consumed per firing; firing rate depends on # of tokens … 3 2 A ready, can fire

(Non-homogeneous-) Synchronous data flow (SDF) (2) In the general case, a number of tokens can be produced/ consumed per firing; firing rate depends on # of tokens … 3 2 B ready, can fire

(Non-homogeneous-) Synchronous data flow (SDF) (3) In the general case, a number of tokens can be produced/ consumed per firing; firing rate depends on # of tokens … 3 2 A ready, can fire

(Non-homogeneous-) Synchronous data flow (SDF) (4) In the general case, a number of tokens can be produced/ consumed per firing; firing rate depends on # of tokens … 3 2 B ready, can fire

(Non-homogeneous-) Synchronous data flow (SDF) (5) In the general case, a number of tokens can be produced/ consumed per firing; firing rate depends on # of tokens … 3 2 B ready, can fire

(Non-homogeneous-) Synchronous data flow (SDF) (6) In the general case, a number of tokens can be produced/ consumed per firing; firing rate depends on # of tokens … 3 2 1 period complete, A ready, can fire Replace FIFO by back-edge

Actual modeling of buffer capacity The capacity of buffers can be modeled easier: 3 2 The buffer capacity of an edge can be modeled as a backward edge where (initial number of tokens = buffer capacity).

Multi-rate models & balance equations (one for each channel) fire B { … consume M } fire A { produce N channel N M FIFO number of tokens consumed number of firings per “iteration” number of tokens produced Schedulable statically In the general case, buffers may be needed at edges. Decidable: buffer memory requirements deadlock Adopted from: ptolemy.eecs.berkeley.edu/presentations/03/streamingEAL.ppt

Parallel Scheduling of SDF Models SDF is suitable for automated mapping onto parallel processors and synthesis of parallel circuits. Many scheduling optimization problems can be formulated. Some can be solved, too! A C B D Sequential Parallel Source: ptolemy.eecs.berkeley.edu/presentations/03/streamingEAL.ppt

Expressiveness of data flow MoCs Turing-complete Not Turing-complete CSDF=Cyclo static data flow (rates vary in a cyclic way) [S. Stuijk, 2007]

The expressiveness/analyzability conflict [S. Stuijk, 2007]

Similar MoC: Simulink - example - Semantics? “Simulink uses an idealized timing model for block execution and communication. Both happen infinitely fast at exact points in simulated time. Thereafter, simulated time is advanced by exact time steps. All values on edges are constant in between time steps.” [Nicolae Marian, Yue Ma] [mathworks]

Starting point for “model-based design” Code automatically generated © MathWorks, http://www.mathworks.de/ cmsimages/rt_forloop_code_wl_7430.gif

Actor languages © E. Lee, Berkeley

Summary Data flow model of computation Motivation Kahn process networks SDF Visual programming languages Simulink