Week 3 Flashcards
What is CPU-I/O Burst Cycle?
Process execution consists of a cycle of CPU execution and I/O wait (CPU burst followed by I/O wait)
When are the four times a CPU scheduling decision may take place?
- Process switches from running to waiting state
- Process switches from running to ready state
- Process switches from waiting to ready state
- Process terminates
What does the dispatcher module do?
The dispatcher module gives control of the CPU to the process selected by the short-term scheduler, this involves
- switching context
- jumping to the proper location in the user program to restart that program
What is dispatch latency?
Dispatch latency is the time it takes for the dispatcher to stop one process and start another running
What are the 5 scheduling criteria?
- CPU utilization - We want the CPU to be as busy as possible
- Throughput - the number of processes completed per time unit
- Turnaround time -The amount of time to execute a particular process
- Waiting time - The amount of time a process has been waiting in the ready queue
- Response time - the amount of time it takes for a response to be produced from a request
What is FCFS?
First come first serve (FCFS) is a scheduling algorithm where processes are executed in the order that they arrive in.
What is the convoy effect?
The convoy effect occurs when processes wait for one large process to get off the CPU. This effect results in lower CPU and device utilization than if shorter processes were allowed to go first.
What is SJF?
Shortest job first (SJF) scheduling is a scheduling algorithm where processes are executed in the order of shortest to longest CPU burst time.
What is SRTF?
Shortest remaining time first (SRTF) scheduling is a scheduling algorithm where processes are executed in the order of shortest remaining time. For example if a process arrives that has a shorter burst time than the one being currently executed that new process will begin executing and the previous one will be put in the ready queue.
What is RR?
Round-robin (RR) is a scheduling algorithm similar to FCFS but instead each process is executed for a set amount of time (time quantum, q) before the CPU begins executing the next process in the ready queue, sending the current process to the back of the ready queue.
What is priority scheduling?
Priority scheduling is a scheduling algorithm where processes are executed in ascending order of priority number.
What is starvation?
Starvation is a problem associated with priority scheduling where low priority processes may never execute because processes with higher priorities keep getting executed first.
What is aging?
Aging is the solution to the starvation problem associated with priority scheduling. Aging is to increase the priority of processes as time goes on so that they are eventually executed even if they were originally low priority.