Basic Concepts
- CPU-I/O Burst Cycle
- Process execution consistes of a cycle of CPU execution and I/O wait
- CPU burst followd by I/O burst
CPU Scheduler and Dispatcher
- CPU scheduler
- selects the process in ready queue, allocates the cpu to one of them
- Dispacher module
- gives control of the cpu to the process selected by short-term scheduler
- switching context
- switching to user mode
- jump to the porper location in the user program to restart that program
Scheduling Criteria
- Max CPU utilization -- keep busy asap
- Max Throughput --complete their execution per time unit
- Min Turnaround time -- amount of time to execute a particular process
- Min Waiting time -- time of process been waiting in the ready queue
- Min Response time - time is takes from when a request was submitted until the first response in produced, not output (for tim-sharing environment)
Scheduling Algorithms
- First-Come,First-Served(FCFS) Scheduling
- Shortest-Job-First(SJF) Scheduling