Expressing Giotto in xGiotto and related schedulability problems - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Expressing Giotto in xGiotto and related schedulability problems

Description:

Joint work with Christoph M. Kirsch and Thomas A. Henzinger. 10 Dec. Project Presentation ... A termination event is specified on release of a task ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 22
Provided by: arkadeb
Category:

less

Transcript and Presenter's Notes

Title: Expressing Giotto in xGiotto and related schedulability problems


1
Expressing Giotto in xGiotto and related
schedulability problems
  • Class Project Presentation
  • Concurrent Models of Computation for Embedded
    Software
  • University of California, Berkeley, USA
  • Dec 10, 2004 
  • Arkadeb Ghosal
  • Joint work with Christoph M. Kirsch and Thomas A.
    Henzinger

2
Overview
  • Introduction
  • xGiotto Language Features
  • The LET model
  • Basic Constructs
  • Event Scoping
  • Event Handling
  • Giotto-to-xGiotto Translation
  • Observations and Present Status

3
Introduction
  • Languages based on Logical Execution Time (LET)
    for tasks
  • A termination event is specified on release of a
    task
  • The evaluation of a task is available only after
    the termination event
  • Giotto
  • Time Triggered
  • Periodic invocation of tasks
  • A mode describes a set of periodic tasks
  • Mode switch defines conditions to jump from one
    mode to another
  • Timed Multitasking
  • Event triggered
  • Assigns deadline for a task at the time of
    release
  • xGiotto
  • Event Triggered
  • Scoping of events

4
Logical Execution Time
  • Events from physical side
  • start
  • preempt
  • resume
  • completion

The logical and physical execution times are
depicted below. The events controlling a task
behavior are
  • Events from logical side
  • release
  • termination

5
xGiotto Basic Constructs
  • Reaction Blocks
  • Basic programming blocks in xGiotto
  • Consists of release statements and trigger
    statements along with an termination information
  • Releases tasks and invokes triggers
  • react reaction block until event
  • Release Statements
  • Tasks are released with the invocation of the
    reaction block
  • Tasks are terminated with the termination of the
    reaction block
  • release task (input ports) (output ports)
  • LET of the task is given by the life-span of the
    reaction block
  • Trigger Statements
  • Associates an event with a reaction block
  • The reaction block is invoked when the event
    occurs
  • when event reaction block
  • Repetition construct using whenever
  • Event Scopes
  • A reaction block defines a scope for its events
  • When a reaction block is invoked (a trigger is
    activated)
  • The events of the new reaction block are enabled
    (active)

6
Basic Features (cont.)
7
Reactions and Triggers
react R1 when e2 react R2 when
e3 react R3 until e7
react R2 when e8 react R5 until
e9
react R3 when e4 react R4 until
e6
react R4 until e5
e2
e6
e5
e4,e6
e8,e9
e6
e6
e2,e7
e2,e3,e7
e2,e7
e2,e7
e2,e7
e7
8
Tasks
  • Tasks are released with the invocation of the
    reaction block
  • Tasks are terminated with the termination of the
    reaction block

react R1 when e2 react R2 when
e3 react R3 until e7
react R3 release t1 when e4
react R4 until e6
react R2 release t3 when e8 react
R5 until e9
react R4 release t2 until e5
e2
e6
e5
e4,e6
e8,e9
e6
e6
e2,e7
e2,e3,e7
e2,e7
e2,e7
e2,e7
e7
t3
t1
t1, t2
t1
9
Handling Events
  • A reaction block defines a scope this implicitly
    denotes the scope of an event
  • When an active trigger is invoked, the called
    reaction becomes the active scope and the caller
    reaction, the passive scope
  • The event of a passive scope can be
  • Ignored (forget)
  • Postponed until its scope becomes active again
    (remember)

react R1 when e2 react R2 when
e3 react R3 until e7
react R3 when e4 react R4 until
remember e6
react R2 when e8 react R5 until
e9
react R4 until e5
e2
e5
e5
e4,e6
e6
e6
e8,e9
e2,e7
e2,e3,e7
e2,e7
e7
e2,e7
e2,e7
10
Parallelism
  • A trigger may invoke multiple reaction blocks in
    parallel.
  • When the trigger is invoked all the reactions
    become active simultaneously.
  • The parent block is active only when all the
    parallel reaction blocks have terminated.

react R2 release t2 when e6 react
R6 until e8
react R3 release t1 when e5
react R5 until e9
react R1 when e2 react R2 R3
until e7
react R6 until e4
e8
e7
e7
e7
e7
e2,e7
e7
e8
e8
e8
e5,e9
e6,e8
e5,e9
e4
e4
t2
t2
t1, t2
t1, t2
11
The Program Flow
Event Filter The Event Filter implements the
event scoping mechanism and filter the incoming
event. It determines which event needs to be
reacted upon depending upon the event qualifiers
forget, remember or asap .
Reactor The Reactor executes the specified
reaction and activates new events
(when/whenever/until) and activates and
terminates tasks.
Scheduler The Scheduler chooses from the active
tasks, a task to be executed on the given
platform (CPU).
12
Program Analysis
  • Platform independent
  • Race Condition Detection
  • Verifying whether a port may be updated by
    multiple task invocations and thus leading to
    non-determinism
  • Resource Size Analysis
  • Predicting the run-time memory requirements for
    executing an xGiotto program the bound on the
    size of the event filter and scopes (trigger
    queue size and active task set size).
  • Platform dependant
  • Schedulability Analysis
  • Ensuring that all the task invocations get access
    to the executing platform at least equal to
    their worst-case-execution times before their
    termination

13
Motivation
  • Simple Schedulability check for Giotto
  • If all modes are reachable, check is polynomial
    and is necessary
  • If some modes are unreachable the check is
    sufficient
  • Reachability of modes is pspace-complete
  • Type system
  • Typed E-code has simple schedulability check
  • Giotto compiler generates typed E-code
  • Interesting Sub-class of xGiotto
  • Time-triggered
  • Expressing Giotto
  • Syntactic characteristics of such a sub-class
  • Scheduling the sub-class
  • Extending to event-triggered systems
  • Schedulability check is not possible for
    arbitrary event

14
Giotto-to-xGiotto (mode)
mode m period 6 task t1 period 3 task t2
period 2
15
Giotto-to-xGiotto (mode switch)
16
Giotto-to-xGiotto (?)
Termination Events are finite
No cyclic calls
All Giotto programs cannot be expressed in
xGiotto in its present form
Giotto programs with all modes releasing a task
of frequency one and/ or releasing a a set of
harmonic tasks can be expressed
17
Proposed modifications
  • No parallel construct
  • All triggers with same event will be enabled
    simultaneously
  • Out-of-scope activation
  • Trigger events with immediate form
  • Modification of until event
  • Extending to termination event and continuation
    event
  • Tasks terminate by termination event
  • Parallel reaction blocks can be released at
    continuation event
  • Constraints on parallelism

react M12 until 3 continue 2 react M2 until 2
continue 1 react M1 until 3 continue 1 react M2
until 2 continue 2
18
Proposed Modifications (cont.)
react m1_0 until 6 continue 4 if (sw21)
react until 2 else react m1_2
until 4 continue 2 react m1_3 until 6
continue 2 if (sw21) react until
1 if (sw12) react until 1
react m2_5 until 2
else react m1_1 until 3 else
react m1_4 until 4
/ main / if (mode m1) react m1 if (mode
m2) react m2
react m1_0 until 6 continue 3 if (sw12)
react until 1 react m2_5 until 2
else react m1_1 until 3
19
Schedulability
  • Sub-class under study
  • Time triggered, all events remembered, all
    children terminates before their parent (span of
    a node is never extended)
  • Sub-class that can express Giotto
  • Composability
  • Two parallel reaction blocks should be
    schedulable independent of each other
  • Reaction Dependency Graph
  • A Graph denoting the calling pattern of the
    reaction blocks
  • For time-triggered programs the exact pattern can
    be derived
  • An efficient way to describe the size of the
    program

20
Schedulability (cont.)
  • Horns algorithm
  • Given a set of aperiodic tasks with their release
    time, termination time and worst-case-execution-ti
    me determines the schedulability
  • Provides an EDF based scheduling strategy
  • EDF is optimal for such a task pattern
  • Efficient pruning of conditional branches
  • Utilization test
  • Syntactic constraints

21
Thank You !
Write a Comment
User Comments (0)
About PowerShow.com