RTS
RTS
RTS
Syllabus
S.N. Unit
Hours
Introduction
10
References
Evaluation:
Internal Marks:
Test=10
Attendance=5
Class activities/participation and Home
assignment:5
Activities
Class assignment
Home assignment
Presentations
Report writing
Real-Time Characteristics
Aperiodic: event-driven.
7
Controlling
System
sensor
sensor
sensor
sensor
actuator
actuator
actuator
actuator
Environment
Sample Applications
Agile Manufacturing
Signal-Processing System
Signal-processing systems transform data from one
form to another.
Examples:
Digital filtering.
Video and voice compression/decompression.
Radar signal processing.
10
11
Internet/Multimedia Applications
Web farms hosting multiple web
domains
static
dynamic streaming
content content video/audio
Server
Challenges
Sharing the resource among domains
(i.e. application pools) may be hard in
general purpose Operating Systems
Guarantee of a uniform, steady, jitterfree execution of time critical
multimedia applications while not
starving other applications
Support of multiprocessor server
systems
Domain 1
Domain 3
Domain 2
13
Other Real-Time
Applications
Real-time databases.
Transactions must complete by deadlines.
Main dilemma: Transaction scheduling algorithms and realtime scheduling algorithms often have conflicting goals.
Data may be subject to absolute and relative temporal
consistency requirements.
Overall goal: reliable responses
Multimedia.
Want to process audio and video frames at steady rates.
TV video rate is 30 frames/sec. HDTV is 60 frames/sec.
Telephone audio is 16 Kbits/sec. CD audio is 128 Kbits/sec.
Other requirements: Lip synchronization, low jitter, low
end-to-end response times (if interactive).
14
Example: Real-Time
Applications
Many real-time systems are control systems
Example 1: A simple one-sensor, oneactuator control system
15
16
Real-Time Command
and
Control
The controller
at the highest level of a control hierarchy is a
18
21
Feasibility
Timing Constraints
A constraints imposed on the timing behavior of a
job
Specified in terms of
Release time
Relative deadline or absolute deadline
The set of rules that determines the order in which
tasks are executed is called a scheduling algorithm
A schedule is feasible if all tasks can be completed
according to the timing constraints
A set of tasks is schedulable if there exists at least
one algorithm that can produce a feasible schedule
24
Type of Tasks
A Periodic task is executed repeatedly at regular
time intervals, and each invocation is called a job or
instance.
Often time-driven
A Aperiodic task is executed to response to external
events, and to respond, it executes aperiodic jobs
whose release time are not know a priori
Often event-driven
Off-line guarantee of aperiodic tasks must make
proper assumptions on the environments; that is,
by assuming a maximum arrival rate for each
event (i.e., minimum inter arrival time)
Aperiodic tasks characterized by a minimum
inter arrival time are called sporadic tasks
25
Classification of
Scheduling Algorithm
Preemptive/Non-preemptive
Preemptive: the running tasks can be interrupted
to assign the processor to another task
Non-preemptive: A task, once started, is
executed until completion.
Static/Dynamic
Static: the scheduling decisions are based on
fixed parameters and assigned to tasks before
their activation
Dynamic: the scheduling decisions are based on
dynamic parameters that may change during
system evolution
26
Classification of
Scheduling Algorithm
(Cont.)
Off-line/On-line
Off-line: a scheduling algorithm is executed on
the entire task set before actual task
activation. The schedule may be stored in a
table and later executed by a dispatcher
On-line: scheduling decisions are taken at
runtime every time a new task enter the
system or when a running task terminates
27
Classification of
Scheduling Algorithm
(Cont.)
Optimal/Heuristic
Optimal: an algorithm is optimal if it minimizes
some given cost function defined over the task set.
If no cost function is given and only concern
feasibility, an algorithm is optimal if it may fail to
meet deadline only if no other algorithms can
meet it
Heuristic: an algorithm is heuristic if it tends toward
but does not guarantee to find the optimal schedule
Dynamic/Fixed
Fixed: in which the priority of each process is fixed
for any instantiation
Dynamic: in contrast from above
28
Commonly Used
Approaches to Real-Time
Scheduling
Clock-Driven
Priority-Driven
30
Clock-Driven Approach
Also called time-driven
Because each scheduling decision is made at a
specific time, independent of events, such as job
releases or completions, in the system
Applicable only when the system is deterministic,
except for a few aperiodic jobs
The parameters of all periodic tasks are known a
priori
Therefore, the scheduler is often constructed by a
static schedule of the jobs off-line
Use a hardware timer to trigger the scheduling
decision
31
Priority-Driven Approach
Scheduling decisions are made when events,
such as release and completions of job occurs
Therefore, priority-driven algorithms are
event-driven
Many non-real-time scheduling algorithms are
priority-driven
FIFO (First-In-First-Out)
Assign priority according to the release time
SETF (Shortest-Execution-Time-First)
Assign priority on the basis of job execution
times
32
Priority-Driven Approach
(Cont.)
Priority-driven real-time scheduling
algorithms
Dynamic-priority
e.g. EDF (Earliest Deadline First)
Fixed-priority
e.g. RM (Rate Monotonic)
33
Questions
1)What is a real time system ? Explain its various components with
a suitable block diagram.
2)What is hard real time system? Explain with example.
3)What is soft real time systems? Explain with example.
4)Differentiate between hard real time systems and soft real time
systems.
5)Explain the RADAR signals processing with block diagram .
6)What is digital control? Explain with example.
7)Explain the real-time command and control system with suitable
example.