- motivation - several processes running at the same time;
utilization (batch), fairness (time sharing)
- objectives - implement the computing abstraction using the cpu; manage
(that is, multiplex) the cpu abstraction among all processes
- performance
- responsiveness, utilization
- queuing theory
- strategy - how to juggle processes; economics; proportional priority
manipulation; optimal scheduling is hard (real-time) or impossible
(non-closed systems)
- process measures - service time, wait time, turnaround time
- system measures - throughput rate, job turnaround time, response time
- the compute-io mix - component processes interspersed by io
- two questions - when to stop and what to start
- yanking the running process
- voluntary surrender - non-preemptive
- a yield or a sleep
- yield to another process (coroutines) or yield to the scheduler
- good - inexpensive (one or two context switches), simple, effective
scheduling
- bad - subject to abuse, hard to do well, subtle errors
- involuntary surrender - preemptive
- the running process is removed
- removal by a combination of process action, timer expiry, rank
pulling
- time slice, quantum
- non-preemptive process selection - all selection is priority bases; the
difference is in how the priorities are assigned
- fcfs - a queue of jobs; easy to implement; non-optimal; no starvation
- shortest job next - jobs ordered by total service time; easy to
implement; optimal average turnaround; large jobs starved
- deadline - jobs ordered by deadline; easy to implement; optimal;
non-admittance possible
- priority - assign arbitrary priority
- preemptive scheduling -
- round-robin - equal priorities, a ring of processes
- multiple-level queues - handles job classes
- foreground-background - batch interactive jobs
- unix scheduling - multiple run queues
- nt scheduling - real-time and variable levels
- implementation
- organization
- parts - arbitrator, context-switcher, queues
- process context
- context is process state - registers, cache, mmu
- a context switch is a save-restore pair - two context switches
required
- context switches are expensive - user-kernel, save-restore, lost
information
- process state diagrams
This page last modified on 17 November 2003.