EE-522: Lecture-2: Basics of Real-Time Scheduling
EE-522: Lecture-2: Basics of Real-Time Scheduling
EE-522: Lecture-2
Recap
Recovery Blocks
Utility
Hard RT task 0
Response Time
Firm RT task
There is a defined deadline
But failure to meet deadline doesn’t mean system failure
Live video streaming
Temperature monitoring using sensor networks
8 EE-522: Embedded Systems 1/25/2018
© Adeel Pasha, LUMS, Spring 2018
Utility
Soft RT task 0
Response Time
The timing constraints are not absolute
Average response time is measured
Internet connectivity (in general), web browsing
Non-RT task
Any example!
Events in RT-System
Stimulus Events
Generated by environment and used by system
Periodic, Aperiodic
Response Events
Produced by system and used by environment
Person Telephone
(Environment) (System)
Response Event
* EFSM: Extended Finite State Machine
12 EE-522: Embedded Systems 1/25/2018
© Adeel Pasha, LUMS, Spring 2018
Timer
Await
Receiver Expired/
Receiver
Lifted/ Beeping
Replacement
13 EE-522: Embedded Systems
Set Timer (3s) 1/25/2018
© Adeel Pasha, LUMS, Spring 2018
Timer Await
Dial-Tone/ Expired/ Receiver
Set Timer (30s) Beeping Replacement
14 EE-522: Embedded Systems 1/25/2018
© Adeel Pasha, LUMS, Spring 2018
Timer Expired/
Await
1stDigit/ Beeping
Receiver
Set Timer (3s) Replacement
15 EE-522: Embedded Systems 1/25/2018
© Adeel Pasha, LUMS, Spring 2018
Timer
Await
Ring-Tone to Expired/
Receiver
Callee/ Beeping
Replacement
Set Timer (3s)
16 EE-522: Embedded Systems 1/25/2018
© Adeel Pasha, LUMS, Spring 2018
2nd Digit/Beeping
Await
1st Digit/ Receiver
Set Timer (50ms) Replacement
Timing
Constraints
Performance Behavioral
Important Notions
Task Instance
Every stimulus event triggers a response event
A piece of code has to be run, etc.
Could be periodic or aperiodic
Ti(j) Jth instance of Task i
Important Notions
Relative vs. Absolute Deadline
Relative Deadline of Ti = di
φi
Ti (1) Ti (2)
0
Arrival or activation of Ti (1)
21 EE-522: Embedded Systems 1/25/2018
© Adeel Pasha, LUMS, Spring 2018
Important Notions
Task Precedence
If a task must be completed before another task to start
It’s recurring
Defines partial ordering among tasks
T1 T3
T4 T2
Important Notions
Data Sharing
Tasks often need to share data
Example: A temperature sensing and processing node
Data sharing can imply a task precedence
But not mandatory
Task precedence without data sharing or data sharing without
precedence?
T1 T3
T4 T2
23 EE-522: Embedded Systems 1/25/2018
© Adeel Pasha, LUMS, Spring 2017
Tasks Classification