Process scheduling Flashcards
What are turnaround and waiting time?
Turnaround time is the time from when a process is submitted to when it it finished. Waiting time is the total time spent waiting for the cpu.
What is response time and throughput?
Throughput is how many processes are completed per time unit.
response time is how long a process has to wait for its first access to the CPU.
What is special about preemptive scheduling?
It can occur even while a process is already in the CPU
What are the advantages and disadvantages of First come first served?
pros: Easy to implementm easy to understand
Cons:Waiting time not likely to be minimal, lots of small processes stuck behind one big one, bad response time.
What are the advantages and disadvantages of Shortest job first scheduling?
pros: optimal average waiting time
cons: don’t know in advance what next CPU burst will be, long processes could also not be executed
What is starvation and what is a solution?
Starvation is when a process waits indefinitely for the CPU. A solution is to increase the priority of processes based on how long they have been waiting for the CPU, this is known as aging.
What is round-robin scheduling? What does a low vs high time quantum provide?
Round robin involves defining a short time quantum. Ready queue is a circular list, each process gets a time allocation of at max one time quantum. If the time quantum is too small we will waste a lot of time with upkeep, if too high it will basically be first come first served.
What are some advantages and disadvantages of round robin?
if big, same pros/cons as FCFS. If small faster response time but slower throughput