Week 4: Process (Short-term schedulers) Flashcards

1
Q

What is the primary goal of a process scheduler?

A

To decide which process in the ready state should run next.

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

What happens if the operating system switches processes too often?

A

Context switching overhead increases, and the processor spends more time switching than running processes.

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

What are the two major classes of scheduling?

A
  • non-preemptive: a running process may only move to the blocked state by choosing to do so itself
  • preemptive: a running process may move itself to the blocked state or may be moved there automatically by the operating system as a result of a clock interrupt
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why is preemptive scheduling harder to implement than non-preemptive scheduling?

A

It requires mechanisms to interrupt and resume processes, such as clock interrupts.

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

What happens in non-preemptive scheduling if a process occupies the CPU for a long time?

A

It continues running until it voluntarily relinquishes control, potentially causing delays for other processes.

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

Name five criteria used for process scheduling.

A
  • fairness: make sure each process gets its fair share of processor time
  • efficiency: keep the processor busy all the time
  • response time: minimise response times for interactive users
  • turnaround: minimise the time batch users must wait for output
  • throughput: maximise the jobs processed per hour
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why can’t all scheduling criteria be satisfied simultaneously?

A

Some criteria conflict

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

What are two simple measures of scheduling algorithm performance?

A
  • Average response time: an average of the time taken for all the processes in an example process queue to start
  • Average turnaround time: an average of the time taken for all the processes in an example process queue to finish
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the First Come First Served (FCFS) scheduling algorithm?

A

It is a non-preemptive scheduling algorithm that executes the processes in the order they arrive in the queue

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

What is the Shortest Job First (SJF) scheduling algorithm?

A

It is a non-preemptive scheduling algorithm that executes the processes that have the smallest known or estimated length

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

What is the Round Robin (RR) scheduling algorithm?

A

It is a preemptive scheduling algorithm that executes the processes by giving a time slice in the order that they appeared in the queue. As each process finishes it is deleted from the queue and the Round Robin continues to the next

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

What is the Priority Queues (PQ) scheduling algorithm?

A

It is a preemptive scheduling algorithm that executes the processes by to the operating system how important the job is considered to be. The highest priority runs first

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

Which scheduling algorithm is best for minimizing turnaround time?

A

Shortest Job First (SJF).

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

Which algorithm is best suited for interactive systems?

A

Round Robin (RR), because it minimizes response time.

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

What are Dynamic Priority Queues scheduling algorithms?

A

A scheduling mechanism where the operating system adjusts process priorities based on their behaviour, such as CPU usage.

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