scheduling – part 2. real-time hard real-time – mandatory response requirement soft real-time...

8
Scheduling – part 2

Upload: samuel-greer

Post on 05-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scheduling – part 2. Real-time Hard real-time – Mandatory response requirement Soft real-time – Requested response requirement Used in: – robotics, –

Scheduling – part 2

Page 2: Scheduling – part 2. Real-time Hard real-time – Mandatory response requirement Soft real-time – Requested response requirement Used in: – robotics, –

Real-time

• Hard real-time– Mandatory response requirement

• Soft real-time– Requested response requirement

• Used in: – robotics, – aircraft control, – manufacturing

Page 3: Scheduling – part 2. Real-time Hard real-time – Mandatory response requirement Soft real-time – Requested response requirement Used in: – robotics, –

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

Page 4: Scheduling – part 2. Real-time Hard real-time – Mandatory response requirement Soft real-time – Requested response requirement Used in: – robotics, –

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

Page 5: Scheduling – part 2. Real-time Hard real-time – Mandatory response requirement Soft real-time – Requested response requirement Used in: – robotics, –

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

Page 6: Scheduling – part 2. Real-time Hard real-time – Mandatory response requirement Soft real-time – Requested response requirement Used in: – robotics, –

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

Page 7: Scheduling – part 2. Real-time Hard real-time – Mandatory response requirement Soft real-time – Requested response requirement Used in: – robotics, –

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

Page 8: Scheduling – part 2. Real-time Hard real-time – Mandatory response requirement Soft real-time – Requested response requirement Used in: – robotics, –

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