Scheduling Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the purpose of scheduling?

A

want to maximise throughput and execute many processes in the least amount of time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Reamble-process queue

A

as a program is waiting to be executed it is stored in a queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The scheduling algorithms

A

first come first served (FCFS)
shortest job first (SJF)
shortest remaining time
round robin
multi level feedback queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

First come first served

A

each process is executed in the order it arrives in he queue
once a process is being executed in the CPU it is executed in full

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Consequences of first come first served

A

takes up lots of time and processes will have to wait sometimes for a very long time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Shortest job first

A

each process has an estimated length of execution
queue is constantly sorted to keep the shortest job at the front of the queue
when a process enters the CPU it is executed in full

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Consequences of shortest job first

A

of process with a long execution time enters the CPU all the processes will still have to wait
if there is a process with a long execution time in the queue it will always be shuffled back and starved of CPU time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Shortest time remaining

A

each process still has an estimate for the time needed to execute
only execute the process with the shortest time remaining even if that means suspending the current process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Issues with shortest time remaining

A

estimating how long a process is going to execute is hard to do accurately
process with a long execution time will have to wait until all the other processes are complete
importance of a program is ignored

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Round robin

A

works with the concept of time slices or quanta
process can only be executed one time slice at a time
if after this time slice the process still hasn’t finished it gets put to the back of the queue and the next process in the queue starts being executed
don’t need to predict how long it will take

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Consequences of round robin

A

considered fair scheduling algorithm
no priority give to any process every process is given equal priority to the CPU
no process is starved of CPU time
easy to implement and don’t need to predict how long a process needs to execute
good compromise between executing long and short processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Multi-level feedback queue

A

multi core CPUs
can give each CPU core a queue to hold processes waiting to be executed
each queue can be given different priorities and use different scheduling algorithms
processes can be moved between queues as priorities change which prevents starving

How well did you know this?
1
Not at all
2
3
4
5
Perfectly