CLICK HERE TO DOWNLOAD PPT ON RTLinux
RTLinux Presentation Transcript
1.RTLinux
2.Defects of Linux
Linux scheduling algorithms are not designed for real-time tasks.
Linux will “batch” operations to make more efficient use of the hardware.
Linux scheduling is unpredictable.
Linux processes are heavyweight processes.
It can take several hundred microseconds to finish a context switch.
Linux Timer resolution is coarse, 10 ms.
Linux Kernel is Non-preemptible .
Even the lowest priority task is running.
Linux will make high priority tasks wait for low priority tasks to release resources.
Linux disables interrupts used for coarse-grained synchronization.
“Coarse grained” synchronization means that there are long intervals when one task has exclusive use of some data.
Linux uses virtual memory.
Linux reorders requests for efficiency (e.g., for disk I/O).
Linux scheduling algorithms are not designed for real-time tasks.
Linux will “batch” operations to make more efficient use of the hardware.
Linux scheduling is unpredictable.
Linux processes are heavyweight processes.
It can take several hundred microseconds to finish a context switch.
Linux Timer resolution is coarse, 10 ms.
Linux Kernel is Non-preemptible .
Even the lowest priority task is running.
Linux will make high priority tasks wait for low priority tasks to release resources.
Linux disables interrupts used for coarse-grained synchronization.
“Coarse grained” synchronization means that there are long intervals when one task has exclusive use of some data.
Linux uses virtual memory.
Linux reorders requests for efficiency (e.g., for disk I/O).
3.RTLinux
RT-Linux is an operating system in which a small real-time kernel coexists with the POSIX-like Linux kernel.
RTLinux is module oriented.
Scheduler.
The “earliest deadline first” scheduler.
Rate-monotonic scheduler.
The module that implements RT-FIFOs.
RTLinux decouples the mechanisms of the real-time kernel from the mechanisms of the general purpose kernel.
Each can be optimized independently.
The RT kernel can be kept small and simple.
RT-Linux is an operating system in which a small real-time kernel coexists with the POSIX-like Linux kernel.
RTLinux is module oriented.
Scheduler.
The “earliest deadline first” scheduler.
Rate-monotonic scheduler.
The module that implements RT-FIFOs.
RTLinux decouples the mechanisms of the real-time kernel from the mechanisms of the general purpose kernel.
Each can be optimized independently.
The RT kernel can be kept small and simple.
4.RTLinux Features
Real-time scheduling algorithm.
Predictable delays.
By its small size and limited operations.
Finer timer resolution.
Preemptible kernel.
The RTLinux executive is itself nonpreemptible.
Its routine are very small and fast, this does not cause big delays.
Interrupts from Linux are disabled.
No virtual memory.
Real-time scheduling algorithm.
Predictable delays.
By its small size and limited operations.
Finer timer resolution.
Preemptible kernel.
The RTLinux executive is itself nonpreemptible.
Its routine are very small and fast, this does not cause big delays.
Interrupts from Linux are disabled.
No virtual memory.
5.Scheduler
RT-Linux contains a dynamic scheduler.
RT-Linux has many kinds of Schedulers.
FIFO.
The “earliest deadline first” scheduler.
Rate-monotonic scheduler.
RT-Linux contains a dynamic scheduler.
RT-Linux has many kinds of Schedulers.
FIFO.
The “earliest deadline first” scheduler.
Rate-monotonic scheduler.
6.RT FIFO
Real-time FIFOs are used to pass information between real-time process and ordinary Linux process.
Real-time FIFOs are designed to never block the real-time task.
RT-FIFOs are, like real-time tasks, never paged out. This eliminates the problem of unpredictable delays due to paging.
Real-time FIFOs are used to pass information between real-time process and ordinary Linux process.
Real-time FIFOs are designed to never block the real-time task.
RT-FIFOs are, like real-time tasks, never paged out. This eliminates the problem of unpredictable delays due to paging.
7.Timer Resolution
8.Applications
9.Introduction to Real-Time Process Scheduling
10.Introduction to Real-Time Process Scheduling (1)
Q: Many theories and algorithms in real-time process scheduling seem to have simplified assumptions without direct solutions to engineers’ problems. Why should we know them?
A:
Provide insight in choosing a good system design and scheduling algorithm.
Avoid poor or erroneous choices.
Q: Many theories and algorithms in real-time process scheduling seem to have simplified assumptions without direct solutions to engineers’ problems. Why should we know them?
A:
Provide insight in choosing a good system design and scheduling algorithm.
Avoid poor or erroneous choices.
11.Introduction to Real-Time Process Scheduling (2)
Checklist
What do we really know about the rate monotonic (RM) and the earliest deadline first (EDF) scheduling?
What is known about uniprocessor real-time scheduling problems?
What is known about multiprocessor real-time scheduling problems?
What task-set characteristics cause NP-hard?
What is the impact of overloads on the scheduling results?
What do we really know about theories for off-line schedulability such as the rate monotonic analysis?
Checklist
What do we really know about the rate monotonic (RM) and the earliest deadline first (EDF) scheduling?
What is known about uniprocessor real-time scheduling problems?
What is known about multiprocessor real-time scheduling problems?
What task-set characteristics cause NP-hard?
What is the impact of overloads on the scheduling results?
What do we really know about theories for off-line schedulability such as the rate monotonic analysis?
12.Introduction to Real-Time Process Scheduling (3)
13.Uni-process Scheduling
Fixed-Priority vs. Dynamic-Priority Scheduling
Rate-Monotonic Scheduling Algorithm
Earliest Deadline First Scheduling
Fixed-Priority vs. Dynamic-Priority Scheduling
Rate-Monotonic Scheduling Algorithm
Earliest Deadline First Scheduling
14.Process Model
Periodic process
Each periodic process arrives at a regular frequency – a special case of demand.
r: ready time, d: relative deadline, p: period, c: worst case computation time.
For example, maintaining a display
Sporadic process
An aperiodic process with bounded inter-arrival time p.
For example, turning on a light
Other requirements and issues:
process synchronization including precedence and critical sections, process value, etc.
Periodic process
Each periodic process arrives at a regular frequency – a special case of demand.
r: ready time, d: relative deadline, p: period, c: worst case computation time.
For example, maintaining a display
Sporadic process
An aperiodic process with bounded inter-arrival time p.
For example, turning on a light
Other requirements and issues:
process synchronization including precedence and critical sections, process value, etc.
15.Performance Metrics
Metrics for hard real-time processes:
Schedulability, etc.
Metrics for soft real-time processes:
Miss ratio
Accumulated value
Response time, etc.
Other metrics:
Optimality, overload handling, mode-change handling, stability, jitter, etc.
Combinations of metrics.
Metrics for hard real-time processes:
Schedulability, etc.
Metrics for soft real-time processes:
Miss ratio
Accumulated value
Response time, etc.
Other metrics:
Optimality, overload handling, mode-change handling, stability, jitter, etc.
Combinations of metrics.
16.Definitions
17.Rate Monotonic Scheduling Algorithm (1)
Assumptions:
all periodic fixed-priority processes
relative deadline = period
independent process - no non-preemptable resources
Rate Monotonic (RM) Scheduling Algorithm
RM priority assignment: priority ~ 1/period.
preemptive priority-driven scheduling.
Example: T1 (p1=4, c1=2) and T2 (p2=5, c1=1)
Assumptions:
all periodic fixed-priority processes
relative deadline = period
independent process - no non-preemptable resources
Rate Monotonic (RM) Scheduling Algorithm
RM priority assignment: priority ~ 1/period.
preemptive priority-driven scheduling.
Example: T1 (p1=4, c1=2) and T2 (p2=5, c1=1)
18.Rate Monotonic Scheduling Algorithm (2)
19.Applications
RM was chosen by
Space Station Freedom Project
FAA Advanced Automation System (AAS)
RM influenced the specs of IEEE Futurebus+
RMA is widely used for off-line analysis of time-critical systems.
RM was chosen by
Space Station Freedom Project
FAA Advanced Automation System (AAS)
RM influenced the specs of IEEE Futurebus+
RMA is widely used for off-line analysis of time-critical systems.
0 comments