Lecture 1 Flashcards
What is a CPU or IO burst?
A burst is when a thread is doing some activity either IO activity or CPU activity.
What is the typical CPU burst distribution like for a process?
Many short CPU bursts and few long CPU bursts.
What are the CPU bursts like for IO bound processes?
Many short CPU bursts.
What are the CPU bursts like for CPU bound processes?
Few long CPU bursts.
What does the CPU scheduler do?
Selects one of the processes in the ready queue to be executed.
What are the ways a ready queue can be implemented?
FIFO queue
a priority queue
a tree
an unordered linked list.
What is each record in the ready queue stored as ?
A process control block.
What is preemptive scheduling?
The scheduler can interrupt the current running process, move it onto the ready or waiting queue and then chooses another process to run.
What is non-preemptive scheduling?
Once a process is running it runs to completion and nothing can interrupt it.
What is the main problem with preemptive scheduling?
Can result in race conditions.
What is the main problem with non-preemptive scheduling?
The performance of the system suffers (poor performance)
Which scheduling criteria do we want to maximize when developing a scheduling algorithm?
- CPU utilization
2. Throughput
Which scheduling criteria do we want to minimize when developing a scheduling algorithm?
- Turnaround time
- Waiting time
- Response time
What is CPU utilization?
Keeping the CPU as busy as possible
Define throughput?
number of processes that complete their execution per time unit
Define turnaround time
Total amount of time to execute a particular process
Define the waiting time
Total amount of time a process has been waiting in the ready queue.
Define Response time
Amount of time it takes from when a request was submitted until the first process response is produced, not output.
What are the two advantages of the FCFS algorithm?
- Simple
2. “Fair”
What are the disadvantages of FCFS?
Average waiting and response time can be long.
What is the convoy effect?
Convoy effect - short process queued behind long process
•Consider one CPU-bound and many I/O-bound processes