EE5903 Ch2 Slides

Embed Size (px)

Citation preview

  • 7/28/2019 EE5903 Ch2 Slides

    1/35

    MandarChitre

    EE5903Real-time Systems

    Real-time System Design

  • 7/28/2019 EE5903 Ch2 Slides

    2/35

    Course Outline

    Introduction to real-time systems Real-time system design

    Inter-process communication

    Inter-process synchronization

    Implementation of concurrency

    Case studies

    Real-time operating systems

    Process scheduling

    Verification and validation

  • 7/28/2019 EE5903 Ch2 Slides

    3/35

    What to avoid!

  • 7/28/2019 EE5903 Ch2 Slides

    4/35

    Desi n Lan ua es

    AlarmClockUser

    TimeAlarm Time

    Time

    Alarm

    Time Server

    Context Diagram

    Stop Alarm

    Data FlowDiagrams (DFD) Unified Modeling

    Language (UML)

  • 7/28/2019 EE5903 Ch2 Slides

    5/35

    Data Flow Dia rams

    ExternalEntity Data StoreProcess Data Flow

  • 7/28/2019 EE5903 Ch2 Slides

    6/35

    La ered DFDs

    ExternalEntity

    Process

    Context Diagram

    ExternalEntity

    Process1

    Level 1 DFD

    Process

    2

    Data Store

    Process 1

    Process2a

    Level 2 DFD - Process 2

    Process2b

    Data Store

    ExternalEntity

    Process1a

    Level 2 DFD - Process 1

    Process1b

    Data Store

    Process 2

  • 7/28/2019 EE5903 Ch2 Slides

    7/35

    Real-time Extensions

    PulseGenerator

    SonarControlSystem

    MatchedFilter

    SonarTransmitter

    Sonar Pulse

    Sonar

    Receiver

    TargetTracker

    TargetsSonar

    Display

    SonarPulse

    SonarPulse

    SonarReturn

    SonarPulse

    Detections

    TransmitTrigger

    ReceiveEnable

  • 7/28/2019 EE5903 Ch2 Slides

    8/35

    DFD Desi n Guidelines

    Most process must have at least one input dataflow(violators are called "magic" processes)

    Most process must have at least one output dataflow(violators are called "black hole" processes)

    Every dataflow must connect two elements one ofthem must be a process; the other can be a terminator, adata store or another process

    Each dataflow diagram should contain no more than 6-7processes and no more than 6-7 data stores, and all the

    processes should be conceptually at the same level ofdetail

  • 7/28/2019 EE5903 Ch2 Slides

    9/35

    Mess DFD!

    Sourcehttp://www.astro.princeton.edu/PBOOK/datasys/dataproc.gif

  • 7/28/2019 EE5903 Ch2 Slides

    10/35

    DFD Desi n Guidelines

    For every process, one of the following must eventuallybe true:

    The description label is so simple and unambiguousthat every reader will understand it in exactly thesame way

    It is expanded or decomposed into a separate lower-level dataflow diagram that preserves exactly the samenet inputs and outputs, but shows internal detail, suchas data stores and internal processes

    It is rigorously described by a separate processspecification (business rule, decision rule, functiondefinition, algorithm, etc.)

  • 7/28/2019 EE5903 Ch2 Slides

    11/35

    Internet Alarm Clock

    AlarmClockUser

    TimeAlarm Time

    Time

    Alarm

    Time Server

    Context Diagram

    Stop Alarm

  • 7/28/2019 EE5903 Ch2 Slides

    12/35

    Internet Alarm Clock

    User

    TimeAlarm Time

    Time

    Alarm

    Time Server

    Level 1 Diagram : Alarm Clock

    Clock

    Oscillator

    Alarm

    Current TimeAlarm Time

    Tick

    Stop Alarm

  • 7/28/2019 EE5903 Ch2 Slides

    13/35

    Internet Alarm Clock

    User

    Level 2 Diagram : Clock

    Time

    Time Server

    SyncTime

    Current Time

    Oscillator

    Tick

    KeepTime

    DisplayTime

    Time

  • 7/28/2019 EE5903 Ch2 Slides

    14/35

    Internet Alarm Clock

    User

    TimeAlarm Time

    Time

    Alarm

    Time Server

    Level 1 Diagram : Alarm Clock

    Clock

    Oscillator

    Alarm

    Current TimeAlarm Time

    Tick

    Stop Alarm

  • 7/28/2019 EE5903 Ch2 Slides

    15/35

    Internet Alarm Clock

    User

    Alarm Time

    Level 2 Diagram : Alarm

    CompareTime

    Alarm Time

    Set Alarm

    Current TimeBeeper

    AlarmTrigger

    Alarm

    StopAlarm

  • 7/28/2019 EE5903 Ch2 Slides

    16/35

    Unified Modelin Lan ua e

    UML2.0

    StructuralDiagrams

    BehavioralDiagrams

    FunctionalDiagrams

    InteractionDiagrams

    ClassDiagram

    StructureDiagram

    ObjectDiagram

    DeploymentDiagram

    ComponentDiagram

    SequenceDiagram

    CommunicationDiagram

    ActivityDiagram

    StatechartDiagram

    Info FlowDiagram

    Use CaseDiagram

    TimingDiagram

  • 7/28/2019 EE5903 Ch2 Slides

    17/35

    Use Case Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    18/35

    Activit Dia rams

    Like flowcharts, but more flexible

    Definitions:

    An action has a "run to completion" semantics

    An activity is like an action, but it may be terminatedby received events

    Token execution semantics

  • 7/28/2019 EE5903 Ch2 Slides

    19/35

    Activit Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    20/35

    Statechart Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    21/35

    Statechart Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    22/35

    Class Dia rams

    Classname

    Attributedefinitions

    Methoddefinitions

    Visibility:

    - Private

    # Protected+ Public

    Method signature

  • 7/28/2019 EE5903 Ch2 Slides

    23/35

    Class Dia rams Association the related classes have a link that

    allows them to invoke services from each other Aggregation ()one or more of the "part" class is

    aggregated to form the "whole" class

    Composition () stronger aggregation relationship,

    with the "whole" class having the responsibility ofcreating and destroying the "part" objects

    Generalization () one class defines a set of

    features that are specialized or extended by anotherclass

    Dependency(---) a relation between two classesthat does not fall into one of the other types

  • 7/28/2019 EE5903 Ch2 Slides

    24/35

    Class Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    25/35

    Class Dia rams

    An operation is an abstraction of a method withoutspecifying the steps needed to provide the service

    An interface is a named collection of services

    The services provided by an interface are represented by

    operations A class is said to realize an interface, if it provides

    methods for each of the interface operations

    Interfaces are denoted in UML using stereotypes or thelollipop notation

  • 7/28/2019 EE5903 Ch2 Slides

    26/35

    Class Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    27/35

    Se uence Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    28/35

    Com onent Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    29/35

    De lo ment Dia rams

  • 7/28/2019 EE5903 Ch2 Slides

    30/35

    Theres lots more to UML Notes

    Stereotypes

    References

    Loops

    Options

    Parallel Execution Other diagrams

    Self study!

  • 7/28/2019 EE5903 Ch2 Slides

    31/35

    Process

    RequirementGathering

    URS

    HLD

    Implementation

    Code DocsCode

    TestingTest Reports

    SystemDesign

    Reviews

    DetailedDesign

    Test Plan

  • 7/28/2019 EE5903 Ch2 Slides

    32/35

    Waterfall Model

    Source: Wikipedia

  • 7/28/2019 EE5903 Ch2 Slides

    33/35

    S iral Model

    Source: Wikipedia

  • 7/28/2019 EE5903 Ch2 Slides

    34/35

    V-Model

    Source: Wikipedia

  • 7/28/2019 EE5903 Ch2 Slides

    35/35

    Summar

    Data flow diagrams Layered data flow design

    UML

    Use case diagrams

    Activity diagrams

    Statechart diagrams

    Class diagrams

    Sequence diagrams

    Component diagrams

    Deployment diagrams

    Development processes