OS Part 4 (Scheduling) Flashcards

1
Q

When are scheduling decisions made?

A

REQUIRED:
1. When a process exits.
2. When a process is blocked due to I/O (waiting for input).

EXPECTED:
1. When a new process is created.
2. When an I/O interrupt occurs.
3. When a clock interrupt occurs.

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

What factors are considered when a scheduling decision is made?

A

Whether or not the currently running process has ran for long enough. This can be based on whether the scheduling type is:

  1. Non-pre-emptive scheduling, where a process runs until it blocks or voluntarily gives up processing time.
  2. Pre-emptive scheduling, where a process runs until it reaches a set maximum time interval.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the general aim of all scheduling systems?

A
  1. Fair access to processor (all programs get a chance to run).
  2. Policy enforcement (processes deemed of higher importance/critical get access to CPU faster/wait less time)
  3. Balance (keeping all parts of the system busy is efficient)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 3 specialised scheduling systems?

A
  1. Batch Systems
  2. Interactive Systems
  3. Real-Time Systems
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of a “Batch System”?

A
  1. Maximise throughput (the amount of jobs being finished per second)
  2. Minimise turnaround (provide output as fast as possible)
  3. Maximise utilisation (keep system busy, but not if it compromises the above goals)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of an “Interactive System”?

A
  1. Optimise response time (foreground tasks the user is interested in are prioritised to increase perceived responsiveness).
  2. Proportionality (attempt to meet user’s expectations of how long each task should take)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the purpose of a “Real-Time System”?

A
  1. Meet deadlines (avoid losing time-critical data).
  2. Avoid quality degradation (ensure quality of data is kept as accurate and reliable as possible).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the main characteristics of a “Batch System”?

A

First Come, First Served:
1. Non-pre-emptive.
2. Processes are assigned to the CPU in order of request.
3. Single queue of ready processes.
4. First job runs until it blocks or terminates.
5. New jobs are put on the end of the current queue.

Advantages - Very simple and easy to implement.
Disadvantages - Computationally heavy processes dominate.

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

What are the main characteristics of an “Interactive System”?

A

Round-Robing Scheduling:
1. Pre-emptive.
2. Each process is assigned a time interval.
3. If still running at the end of its time-slot, suspend task and assign new task to CPU.
4. Maintain a list of ready/runnable processes, of which suspended processes are placed at the end.

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

What three priority systems can “Batch Systems” work off?

A
  1. First come, first served (Easier to implement, common example)
  2. Shortest job first (Generally more optimal and responsive)
  3. Shortest time remaining (I don’t know how much better this is)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What effects does changing the time allocation (quantum) for a process have on overall execution in “Interactive Systems”?

A

If the quantum is too short, CPU switches between tasks rapidly. Switching tasks comes with a slight processing overhead, so if switching happens too often, CPU resources are wasted.

If the quantum is too long, the CPU switches between tasks slower, making the overall system less responsive.

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

How can schedules be improved using priorities?

A

Allow parent processes to manage their children processes based on their own individual priorities.

This will create a tree-based structure of self-organising processes which have a better chance of being efficient whilst also allowing for effective use of round-robin techniques and preventing from compute heavy tasks from preventing responsiveness and causing I/O blocking.

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