Scheduling: round robin, first come first served, multi-level feedback queues, shortest job first and shortest remaining time Flashcards

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

Explain the purpose of scheduling

A
  • Makes the most efficient use of the processor/resources
  • Be fair to all users/applicants
  • Provide a reasonable response time
  • Prevent processes from failing to run/process starvation/deadlock
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is meant by a pre-emptive scheduling algorithm?

A

Jobs are actively made to start and stop by the
operating system
- Multilevel Feedback Queues, Shortest Remaining Time, Round Robin

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

What is meant by a non pre-emptive scheduling algorithm?

A

Once a job is started, it is left alone until it is completed
- First Come First Served, Shortest Job First

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

State 5 different scheduling algorithms

A
  • Round robin
  • First come first served
  • Shortest job first
  • Shortest remaining time
  • Multilevel feedback queues
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is round robin?

A
  • Each job is given a section of processor time - known as a time slice (allowed to execute)
  • Once each job in the queue has used its first time slice, the operating system again grants each job an equal slice of processor time
  • This continues until a job has been completed, at which point it is removed from the queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Advantages of round robin?

A
  • Every process gets an equal share of the CPU

- RR is cyclic in nature, so there is no starvation

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

Disadvantages of round robin?

A
  • Longer jobs will take a much longer time for completion due to their
    execution being inefficiently split up into multiple cycles
  • Does not take into account job priority
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is first come first served?

A

Jobs are processed in chronological order by which they entered the queue

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

Advantages of first come first served?

A
  • Simple and easy to understand

- Straightforward to implement

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

Disadvantages of first come first served?

A
  • FCFS again does not allocate processor time based on priority
  • The process with less execution time suffer i.e. waiting time is often quite long
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is multilevel feedback queues?

A

This makes use of multiple queues, each which is ordered based on a different priority

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

Advantages of multilevel feedback queues?

A
  • It is more flexible
  • It prevents starvation by moving a process that waits too long from the lower priority queue to the higher priority queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Disadvantages of multilevel feedback queues?

A
  • Difficult to implement due to deciding which job to prioritise based on a combination of priorities
  • Most complex algorithm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is shortest job first?

A

The queue storing jobs to be processed is ordered according to the time
required for completion, with the longest jobs being serviced at the end

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

Advantages of shortest job first?

A
  • It is suitable for the jobs running in batches, where run times are already known
  • SJF is better than the First come first serve (FCFS) algorithm as it reduces the average waiting time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Disadvantages of shortest job first?

A
  • SJF may cause starvation if shorter processes keep coming, this problem is solved by ageing
  • Requires the processor to know or calculate how long each job will take and this is not always possible
17
Q

What is shortest remaining time?

A

The queue storing jobs to be processed is ordered according to the time left for
completion, with the jobs with the least time till completion being serviced first

18
Q

Advantages of shortest remaining time?

A
  • This scheduling is optimal in that it always produces the lowest mean response time.
  • Processes with short CPU bursts are given priority and hence run quickly (are scheduled frequently)
19
Q

Disadvantages of shortest remaining time?

A
  • Long-burst (CPU-intensive) processes are hurt with a long mean waiting time (long-burst ones may never get scheduled), starvation
  • Effectiveness of meeting the scheduling criteria relies on the accuracy to estimate the length of the next CPU burst