Scheduling Flashcards
Boot Sequence
(1) CPU loads boot program from ROM, (2) the boot program examines and checks the memory configuration, builds a configuration structure describing the hardware, loads the OS kernel and gives it the configuration structure, (3) initializes OS
Initializing the OS
(1) initialize kernel structures, (2) initialize the state of all hardware devices, (3) creates a number of processes to start operation. (4) if there are user programs, those are run, else it enters the idle loop
OS wakes up from…
Interrupts, exception, and system calls (traps)
Multiprogramming / Concurrency
One process running while one or more on I/O to increase system utilization and throughput
Context Switch
Changing from one process to another
What are the steps of a context switch?
(1) Process is running, (2) Process is blocked or interrupted, (3) Switch to kernel, (4) OS saves process state to PCB, (5) OS chooses new process to run, (6) OS loads its state from PCB, (7) Process is running
When does the kernel run the scheduler?
A process switches from running to blocked, a process is created or terminated. an interrupt occurs
Non-preemptive System
Scheduler runs when a process is blocked, not because of an interrupt
Preemptive System
OS makes scheduling decisions during interrupts, but requires interrupt to give control back to OS
Throughput
number of processes completed during a unit of time
Turnaround Time
length of time to run a process from initialization to termination
CPU utilization
percentage of time that the CPU is busy
Response Time
time between issuing a command and getting a result
Waiting Time
Total amount of time that the process is in the ready queue
What are the 5 criteria for comparing scheduling algorithms?
Throughput, turnaround time, cpu utilization, response time, and waiting time