Ch 6 Flashcards
alternating CPU busts
Process starts with CPU bust and alternates with I/O bust
short-term-scheduler
chooses processes from job pool to be executed in CPU
nonpreemptive
When a process switches from the running state to the waiting state (for example, as the result of an I/O request or an invocation of wait() for the termination of a child process)
When a process terminates
dispatcher
the module that gives control of the CPU to the process selected by the short-term scheduler.
This function involves the following:
- Switching context
- Switching to user mode
- Jumping to the proper location in the user program to restart that program
FCFS
First Come First Serve
managed with a FIFO queue
* may lead to starvation if long processes are scheduled first.
SJF
Shortest Job First
Difficulties: knowing the lengths, fairness, and starvation
SRTF
Shortest Remaining Time First
Solves starvation. still hard to predict execution time.
Priority-scheduling
Problem: Starvation – low priority processes may never execute
Solution: Aging – as time progresses increase the priority of the process
RR
Round Robin
if time quantum or time slice is large, it operates as FIFO, if it is too small, CPU cycles wasted with context switching.
multilevel queue scheduling
foreground vs background processes
convoy effect
short process behind log process
minimizing waiting time
Methods like SJF, SRTF, priority scheduling, RR, and multilevel queue have this effect.
foreground process
interactive process with the need of fast response time (may be implemented with RR).
background process
batch process that may be implemented with FCFS.
CPU scheduling decisions occur when a process..
◦ Switches from running to waiting (nonpreemptive)
◦ Switches from running to ready (preemptive)
◦ Switches from waiting to ready (preemptive)
◦ Terminates (nonpreemptive)
CPU scheduling criteria
CPU utilization, Throughput, Waiting time, Fairness