Chapter 8 (Part A)_with audio
Chapter 8 (Part A)_with audio
Chapter 8
Embedded System Design
UCS614
Press F5 to listen audio
Real-time Tasks
• Performance is judged on the basis of time
• Result of computation is ‘correct’ only if
correct output with in the specified time
constraint.
• If fail to meet time constraint
– System failure
– Reduced ‘quality of service’
Real-time Tasks
Example
• Process control
• Air traffic control
• Telecommunications
• Weapon guidance system
• Life support systems
• Anti-lock breaking systems
Real-time Systems and Embedded
Systems
Are Real-time Systems and Embedded Systems
are same?
• No
Definitions
• Release Time: Time instant at which a task is
ready for execution
• Scheduling Time: Instant of time at which a task
gets its chance to execute
• Completion Time: Instant of time at which a task
completes execution
• Deadline: Instant of time by which a task should
be completed
• Run time: Time taken without interruption to
complete the task, after the task is released
Definitions
• Tardiness: Amount of time by which a task
misses its deadline
• Laxity: Deadline – remaining completion time
maximum amount of time task can wait
with out missing its deadline
T
R S C D
Task
-----> Time
Types of Real-time Tasks
Based on Timing Constraint
• Hard
• Soft
• Firm
V
----> Value
R D
-----> Completion Time
Types of Real-time Tasks
• Soft Real-time Tasks
Tasks Ti is soft real-time task, if Ci<=Di penalty is
associated
Penalty increases as (Ci- Di) increases
V
----> Value
R D
-----> Completion Time
Types of Real-time Tasks
• Firm Real-time Tasks
Value reduces to zero if deadline is not met.
Output of such task is discarded.
Dropping of task is allowed, once in a while.
Real-Time Systems
• System must contain at least one task of the
types
– Hard
– Soft
– Firm
Types of Real-time Tasks
Based on Occurrence of task
• Periodic
• Aperiodic
• Sporadic
Types of Real-time Tasks
• Periodic
- Real time tasks arrive(activated) at regular (fixed)
intervals.
- Execute once per time interval
Types of Real-time Tasks
• Aperiodic
- Real time tasks arrive(activated) at irregular
intervals.
- Inter-arrival period between two such tasks can be
zero
- Generally have soft deadlines
Types of Real-time Tasks
• Sporadic
- Aperiodic task with minimum inter-arrival time
- Hard deadline
Types of Real-time Tasks
Based on allowing interruption of running task
• Preemptible
- Task can be preempted, if another task of higher
priority becomes ready.
Types of Real-time Tasks
Based on allowing interruption of running task
• Non-Preemptible
- Should continue execution without interruption,
once started.
Real-time Operating System
• Do embedded systems need an operating
system?
– Simple embedded applications like printer,
scanners, sensor based home security systems
need only hardware and firmware
• Generally follow super loop based approach
• Whole code is written as one loop which executes
continuously
Real-time Operating System
• Do embedded systems need an operating
system?
– Complex systems need manager
– But all embedded systems need not require real -
time operating systems.
– Require RTOS where time constraint is a factor
Real-time Operating System
• What does RTOS do?
– Provides abstraction layer b/w embedded
hardware and application software
– Ensures that multiple tasks that comes in, are
managed and done ‘on time’
Real-time Operating System
• Kernel services of RTOS