80 likes | 196 Views
Scheduling – part 2. Real-time. Hard real-time Mandatory response requirement Soft real-time Requested response requirement Used in: robotics, aircraft control, manufacturing. Other Schemes. FCFS (FIFO) – single queue
E N D
Real-time • Hard real-time • Mandatory response requirement • Soft real-time • Requested response requirement • Used in: • robotics, • aircraft control, • manufacturing
Other Schemes • FCFS (FIFO) – single queue • Round robin – equal time slice, but overhead for context switching • Time-sharing systems • Transaction processing • Shortest Process Next (SPN) – non-preemptive • Exponential averaging to compute time left • Shortest Remaining Time (SRT) • add-on to SPN • Highest Response Ratio Next • Based on expected turnaround time • Accounts for aging
Queues & Lists • Multiple lists/queues • Based on interactivity • Highly interactive programs • Short quanta • Frequent access to CPU • Moderately interactive • Longer quanta • Less frequent access to CPU • Batch • Very long quanta • Very low access to CPU
Multiprocessor systems • Multi-CPU vs. hyper-threading of cores • Multi-CPU • Each CPU runs a separate process • Each CPU (if hyperthreaded) can run separate inst streams of ONE process • Hyperthreading • Requires SMP support • Duplicates arch elements • Control, MMU, status, general purpose, address, interrupt-mask & stack registers • NOT the ALU
MP system considerations (continued) • Load sharing • Gang scheduling – groups of related threads scheduled on specific CPU’s • Dedicated CPU assignment (1 CPU/thread) • Dynamic scheduling - # threads varies, O/S manages thread placement
Development -1 • MS-DOS – one process at a time, runs to completion • Windows 3.1 – multi-programming (NO threads), non-preemptive (needed H/W) • Windows 95 – added preemption (H/W available) • Mac OS X (based on Mach from CMU) • Multi-level queue ( “bands”) • Regular threads • Elevated user threads • KLT’s • Real-time threads
Development -2 • Linux • No multi-level feedback queue • Version differences • 2.2 – added scheduling classes & real-time policies • 2.4 – real-time scheduler + UNIX-based scheduler • O(n) scheduler • 2.6.22 – O(1) scheduler • 2.6.23 – Completely Fair Scheduler • Symbian • 64 priority levels • Does not work on MP systems