Resource Kernels: Linux/RK Raj Rajkumar, Kanaka Juvva, Anastasio Molano and Shui Oikawa, “Resource Kernels: A Resource-Centric Approach to Real-Time Systems”, In Proceedings of the SPIE/ACM Conference on Multimedia Computing and Networking, January 1998.
Resource Kernels: Linux/RK. Raj Rajkumar, Kanaka Juvva, Anastasio Molano and Shui Oikawa, “Resource Kernels: A Resource-Centric Approach to Real-Time Systems”, In Proceedings of the SPIE/ACM Conference on Multimedia Computing and Networking, January 1998. Before we start…. Unix Scheduling - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Resource Kernels: Linux/RK
Raj Rajkumar, Kanaka Juvva, Anastasio Molano and Shui Oikawa, “Resource Kernels: A Resource-Centric Approach to Real-Time Systems”, In Proceedings of the SPIE/ACM Conference on Multimedia Computing and Networking, January 1998.
Before we start…
• Unix Scheduling– Mainly for time-sharing– Multilevel feedback queue– Each queue applies Round Robin
Linux/RK AbstractionsCMU’s Linux/RK supports several abstractions and primitives
for real-time scheduling of processes with real-time and QoS requirements:
• Resource reservations with latency guarantees– CPU cycles– Network bandwidth– Disk bandwidth
• Support for periodic tasks.• Support for 256 real-time fixed-priority levels. • High-resolution timers and clocks. • Bounding of priority inversion during synchronization
operations– Also works with reservations (reservation inheritance,
etc.) • Wiring down of memory pages.
Source: Dr. Rajkumar at CMU
Reservation Types
• Hard reservation: On depletion, it cannot be scheduled until it is replenished
• Firm reservation: On depletion, it can be scheduled if no other undepleted reservation or unreserved threads are ready to run
• Soft reservation: On depletion, it can be scheduled with other unreserved threads and depleted reservations
Hard reservation
Firm reservation
Soft reservation
Scheduling & Admission Control
• Each reservation receives a fixed priority according to period (RMS) or deadline (DMS)
• Admission control overhead
Disk Scheduling• Traditional RT systems avoided to use disk
– Unpredictable latencies– Disk access requests should be scheduled in conjunction
with the processor scheduling• Multiple resource problem with deadlines is NP-complete
[5]
• Disk bandwidth reservations in addition to CPU cycle reservations– EDF: Pick the reservation with the earliest deadline
• Immediate preemption of a disk access is impossible• EDF is not optimal in a non-preemptive model• A lot of disk head movements
– EDF + Just-in-time scheduling• High priority tasks may finish early• Exploit “slack” to serve requests close to the current head
position, similar to SCAN
Workload with both CPU and Disk requirements
Commercialized Linux/RK: TimeSys Linux
• Resource kernel and QoS Support– guaranteed, timely and enforced
access to CPU cycles and network bandwidth
• SMP support with QoS Reservations• Fully preemptive kernel• Fixed-priority scheduling (POSIX-
compliant)• High-resolution timer and clock support
– Support priority inheritance and a POSIX-based high-resolution timer API
• TimeSys Linux/CPU – Support CPU reservation, which gives a thread, process, or process
group exclusive use of the CPU. • TimeSys Linux/Net
– Support network bandwidth reservation to guarantee that your thread or process will get the bandwidth it requires, regardless of network activity in other processes
• TimeSys Linux GPL: Downloadable from sourceforge.net/projects/timesysgpl • TimeSys Linux Install mini HOWTO:
• EDF is hard to implement because most operating systems only support a fixed number of priority levels (typically <= 256)
• Deadline scheduling, e.g., EDF, can be better fixed priority scheduling which is oblivious to deadlines– Example: Consider the following scenario in
RMS DH
DL
TH
TL
Fixed priority vs. Dynamic priority
• Fixed priority– Supported by most kernels– Simple & little overhead– Low utilization bound
• RMS: 0.69
• Dynamic priority– Deadline is the first class citizen– High utilization bound: 1 in EDF– Limited priority levels in most kernels– More complex; High overhead