adrats

Upload: nirmal-raj-deivasigamani

Post on 14-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 ADRATS

    1/35

    ADARTS

    (Ada-based Design Approach for Real-Time Systems)

  • 7/27/2019 ADRATS

    2/35

    ADARTS

    The ADARTS method was created to developan Ada design from a Real-Time StructuredAnalysis (RTSA) specification.

    Features of ADARTS are: principles for decomposing a real-time system into

    concurrent tasks and information hiding modules.

  • 7/27/2019 ADRATS

    3/35

    Task and module structuring criteria Applied to the leaf transformations on the RTSA data

    flow/control flow diagrams. Each transformation isviewed from both a dynamic and static perspective.

    Dynamic perspective: each transformation is considered as a separate thread of

    control.

    Static perspective: related functions (operations) identified in the RTSA are

    grouped into a module based on the information hidingcriterion.

  • 7/27/2019 ADRATS

    4/35

    ADARTS Steps and Work Products

  • 7/27/2019 ADRATS

    5/35

    Steps in using ADARTS1. Develop an RTSA Specification

    2. Structure the system into concurrent tasks

    3. Structure the system into Information hiding modules

    4. Integrate the task and module views

    5. Develop an Ada-based design

    6. Define component interface specifications

    7. Develop the software incrementally

  • 7/27/2019 ADRATS

    6/35

    Task Structuring A task (concurrent process) represents the execution

    of a sequential program or, as in Ada, a sequentialcomponent in a concurrent program.

    Each task deals with one sequential thread of execution; hence no concurrency is allowed within atask.

    However overall system concurrency is obtained byhaving multiple tasks that execute in parallel.

  • 7/27/2019 ADRATS

    7/35

    Task Structuring Categories I/O task structuring criteria

    Internal Task Structuring criteria

    Task Cohesion Criteria

    Task Priority Criteria

  • 7/27/2019 ADRATS

    8/35

    I/O task Structuring Criteria

    Characteristics of I/O Devices

    Characteristics of Data

    Characteristics of passive devices

    Polling frequency for passive devices

  • 7/27/2019 ADRATS

    9/35

  • 7/27/2019 ADRATS

    10/35

    Asynchronous Inputdevice

    Generates an interrupt when it has producedsome input that requires processing by the

    real-time system

    Asynchronous Outputdevice

    Generates an interrupt when it has finished processing output operation and is ready to

    perform some new output.

    Passive Input deviceInput from passive input device needs to beread either on polled basis or on demand

    Passive Outputdevice

    Output needs to be provided either on regular (periodic) basis or on demand

  • 7/27/2019 ADRATS

    11/35

    Characteristics of Data

    Discrete data Finite number of values

    Continuous data (analog data) Infinite number of values Polling

  • 7/27/2019 ADRATS

    12/35

    Characteristics of passive devices :Polling

    Polling Sample the device on demand

    Periodic polling

    Data written to a data store

  • 7/27/2019 ADRATS

    13/35

    Polling Frequency for Passive Device

    Input device: how critical the input is and how frequently it is

    expected to change.

    Output device: How often data should be output in order to

    prevent it from getting out of date.

  • 7/27/2019 ADRATS

    14/35

    I/O TASK

    AsynchronousI/O Task

    Periodic I/OTask

    Asynchronousdevice Passive device

  • 7/27/2019 ADRATS

    15/35

    Asynchronous I/O Task or Aperiodic Task

    Read Panel input Validate input

    Handling ControlPanel Input

    Processingcontrol

    panel input

    Panel

    Inputs

    Push buttons,

    switch

    Panel inputinterrupt

  • 7/27/2019 ADRATS

    16/35

    Periodic Task

    Readtemperature

    input

    Temperature

    Temparature inputtask

    Panel inputinterrupt

    Temperature

  • 7/27/2019 ADRATS

    17/35

    Resource monitor task

    An input or output device that requests frommultiple sources have a resource monitor task to coordinate these request.

    Ex.: printer monitor task

  • 7/27/2019 ADRATS

    18/35

    Internal task structuring task Periodic task

    Asynchronous task

    Control task

    User role task

    Multiple task of same type

  • 7/27/2019 ADRATS

    19/35

    TASK COHESION CRITERIA

    Temporal cohesion

    Sequential cohesion

    Control cohesion

    Functional cohesion

  • 7/27/2019 ADRATS

    20/35

    Temporal cohesion

    Certain functions may perform operations thatare activated by the same event.

    functions may be grouped into a task, so that

    they are executed each time the task receives astimulus

  • 7/27/2019 ADRATS

    21/35

    Temporal cohesion : issues One function is more time critical than the

    other.

    Functions executed on separate processor

    Sampling rate of functions

    Functions with different priorities

  • 7/27/2019 ADRATS

    22/35

    Sequential cohesion

    Certain functions may perform operations thatmust be carried out sequentially.

    The first function in the sequence is triggered by an asynchronous or periodic event. Thesesequentially dependent functions may becombined into one sequentially cohesive task.

  • 7/27/2019 ADRATS

    23/35

    Sequential Cohesion : issues

    Next transformation in the sequence alsoreceives inputs from another source andtherefore activated by receiving input from thatsource.

    Next transformation is of lower priority andfollows time critical functions

  • 7/27/2019 ADRATS

    24/35

  • 7/27/2019 ADRATS

    25/35

    Control cohesion: issues State dependent transformations that are triggered by the

    control transformations as a result of state transition. Group

    State dependent transformations that are enabled or disabled by the control transformations as a result of state

    transition. Separate task

    State dependent transformations that are triggered by thecontrol transformations as a result of state transition andexecute for the duration of the state.

    Non-state dependent transformations that sends events tothe control transformations, which cause it to change state.

    group

  • 7/27/2019 ADRATS

    26/35

    TASK PRIORITY CRITERIA Time critical:

    A time critical function, i.e. one that needs to meeta hard deadline, needs to run at a high priority and

    therefore be structured as a separate high prioritytask.

    Computationally intensive A non-time critical computationally intensive

    function (or set of functions) may run as a low priority task consuming spare CPU cycles

    T k C i ti d

  • 7/27/2019 ADRATS

    27/35

    Task Communication andSynchronization

  • 7/27/2019 ADRATS

    28/35

    STATIC VIEW

    Information Hiding And ModuleStructuring

  • 7/27/2019 ADRATS

    29/35

    STATIC VIEW

    Changing requirements are all too frequent andcannot be ignored.

    Software design of designing maintainable and potentially reusable software componentsusing information hiding.

  • 7/27/2019 ADRATS

    30/35

    Information Hiding And ModuleStructuring categories

    Device interface modules

    Behaviour hiding modules Data abstraction module State transition module Function driver module Algorithm hiding module

    Software decision moudles

  • 7/27/2019 ADRATS

    31/35

    Device interface modules (DIM)

    Application software __________________

    Virtual device interface(access procedures/functions)

    ____________________

    Real world device interface __________________

    real world I/O device

    Software

    Hardware

  • 7/27/2019 ADRATS

    32/35

    DIM

    Hides actual interface to the real-world device by providing a virtual interface to it.

    For each I/O device and the functions on the DFD aremapped to the operations provided by DIM

    ReadTemperature

    inputTemperatureTemperature

    sensorReadTemperature

    FIG: DFDFIG: Temperature Sensor DIM

  • 7/27/2019 ADRATS

    33/35

    h h d d l

  • 7/27/2019 ADRATS

    34/35

    Behaviour hiding modulesData Abstraction Module

    Read

    Location

    FIG: host aircraft position DAM

    WriteLocation

  • 7/27/2019 ADRATS

    35/35

    Behaviour hiding modulesState Transition Module

    Processevent

    Currentstate