hrt-hood [email protected] real-time systems lecture 4 copyright, 2002 © adam czajka
TRANSCRIPT
HRT-HOOD HRT-HOOD
Real-Time SystemsReal-Time Systems
Lecture 4Lecture 4
Copyright, 2002 © Adam Czajka
Copyright, 2002 © Adam Czajka
Contents
Object types
Data flow
Object attributes
Decomposition
Classes
Distributed systems
Copyright, 2002 © Adam Czajka
Object types
Active (A)
Passive (Pa)
Cyclic (C)
Sporadic (S)
Protected (Pr)
Pr B u f f e r
Put
* Get
Pr B u f f e r
Put
* Get
Copyright, 2002 © Adam Czajka
Object typesPassive Objects
Pa Math Sum * Mul
Passive object == Set of operationsPassive object == Set of operations
Copyright, 2002 © Adam Czajka
Object typesActive Objects – operation types
A Hotel ASER PutKey HSER * GetKey LSER Reservation HSER Confirm
Asynchronous
(ASER)
Loosely
Synchronous (LSER)
Highly Synchronous
(HSER)
Functional Functional
activation activation
constraintsconstraints
Copyright, 2002 © Adam Czajka
Object typesActive Objects –
timeout constraints
Timeout constraints are related only to :
• HSER TOER_HSERTOER_HSER
• LSER TOER_LSERTOER_LSER
(Timed Operation Execution Request)
Copyright, 2002 © Adam Czajka
Object typesActive Objects –
timeout constraints
A Post_Office LSER Send_Letter TOER_HSER * Telephone_Call
Copyright, 2002 © Adam Czajka
Object typesCyclic Objects
C Sensor
Object is invoked periodicallyObject is invoked periodically
Copyright, 2002 © Adam Czajka
Object typesSporadic Objects
S Button
ASER Start
Start operation can be raised by interruptStart operation can be raised by interrupt
Copyright, 2002 © Adam Czajka
Object typesProtected Objects –
operation types
Asynchronous
(PAER) - in
Synchronous
(PSER) – in/outs
Pr Storage
LSER Put HSER * Get
Only PSER Only PSER operations can have functional operations can have functional activation constraintsactivation constraints
Copyright, 2002 © Adam Czajka
Data flow
InElem
PSER
PSER
A Producer A Consumer
Pr Storage
* PutElement * GetElement
OutElem
Copyright, 2002 © Adam Czajka
Data flowFunction calling rules
Active (A) Any other object
Cyclic (C), Sporadic (S) Any other object
except active (the asynchronous active
operations are allowed to be called)
Protected (Pr) Only Protected or Passive (the
asynchronous operations of all other objects are
allowed)
Passive (Pa) Only Passive
Copyright, 2002 © Adam Czajka
Data flowFunction calling rules
If A and B are passive (or protected) objects
and object A calls the operation from object
B, then it is NOT allowedit is NOT allowed to call any operation
from object A by object B.
General rule :
Copyright, 2002 © Adam Czajka
Exceptions
Pr Dispatcher
Schedule
In_El
Out_El
NoSpace
Pa Queue
PutElem GetElem
Copyright, 2002 © Adam Czajka
Object attributes
DEADLINE
THREAD BUDGET
THREAD WCET
OFFSET
PRIORITY
IMPORTANCE
INTEGRITY
PERIOD (Cyclic objects only)
Minimum Arrival Time (Sporadic objects only)
Copyright, 2002 © Adam Czajka
Object attributes
OPERATION BUDGET
OPERATION WCET
(WCET = BUDGET + ERROR_HANDLING)
CEILING PRIORITY
INTEGRITY
Operation attributes :
Protected object attributes : Goal : Goal :
To check the system To check the system
schedulability.schedulability.
Copyright, 2002 © Adam Czajka
Decomposition
Objects
Operations
Whole systemWhole system
(1 active object)(1 active object)
More detailed More detailed
componentscomponents
decompositiondecomposition
Decomposed system Decomposed system
(no active objects)(no active objects)
Copyright, 2002 © Adam Czajka
Decomposition
Active any other object
Passive only Passive objects
Protected Passive object + 1 Protected
Sporadic Passive, Protected, Cyclic + at least
1 Sporadic
Cyclic Passive, Protected, Sporadic + at least
1 Cyclic
Object decomposition rules :
Copyright, 2002 © Adam Czajka
DecompositionDecomposition rules (operation
decomposition examples) :
ASER ASER
ASER PAER
LSER PSER
PSER PSER
Decomposition is valid only if it doesn’t affect Decomposition is valid only if it doesn’t affect
the parent object properties.the parent object properties.
Copyright, 2002 © Adam Czajka
Decomposition
A Console
Display_Line
Read_Line
ASER
HSER
Decomposition example
Copyright, 2002 © Adam Czajka
Decomposition
Copyright, 2002 © Adam Czajka
Environmental objects
Copyright, 2002 © Adam Czajka
Classes
Copyright, 2002 © Adam Czajka
Distributed systems
Buffer :Buffer :
•Real objectReal object
•Client „stub”Client „stub”
•Server „stub”Server „stub”
Copyright, 2002 © Adam Czajka
SummarySummary
Object types
Data flow
Object attributes
Decomposition
Classes
Distributed systems