CPU Scheduling Flashcards

1
Q

What is a CPU - I/O Burst

A

Process execution consists of a cycle of CPU execution and
I/O wait

  • Data transfers from disk to memory
    are handled by the system bus.
  • This means that the processor is available to
    process data during disk I/O.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Short-term scheduler?

A

Selects which process should be executed next and allocates CPU
* Sometimes the only scheduler in a system
* Short-term scheduler is invoked frequently (milliseconds) (must be fast)

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

What is a Long-term scheduler scheduler?

A

Long-term scheduler (or job scheduler): selects which processes should be brought into the ready queue
* Long-term scheduler is invoked infrequently (seconds, minutes)
* The long-term scheduler controls the degree of multiprogramming

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

What are the type of process scheduled

A
  • I/O-bound process: spends more time doing I/O than computations, many short CPU bursts
  • CPU-bound process: spends more time doing computations; few very long CPU bursts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Medium-Term Scheduling?

A
  • Medium-term scheduler can be added if degree of multiple
    programming needs to decrease
  • Remove process from memory, store on disc, bring back in from disc to continue execution: swapping
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the dispatcher?

A

The module that gives control of the CPU to the
process selected by the scheduler. This function involves:
* Switching context.
* Switching to user mode.
* Jumping to the proper location in the newly loaded program.

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

What CPU short-term scheduling decisions may take place? 4 points

A
  1. Switches from running to waiting state
  2. Switches from running to ready state
  3. Switches from waiting to ready
  4. Terminates

Scheduling under 1 and 4 is non-pre-emptive

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

When can Pre-emptive scheduling cause problems?

A

When two processes share data, one process may get interrupted in the middle of updating shared data structures

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

CPU Scheduling Criteria

A

CPU utilisation: keep the CPU as busy as possible
* Throughput: # of processes that complete their execution per
time unit
* Turnaround time: amount of time to execute a particular process
* Waiting time: amount of time a process has been waiting in the
ready queue
* Response time: amount of time it takes from when a request was
submitted until the first response is produced, not output (for timesharing environment)

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

Scheduling Algorithm Optimisation Criteria 5 key points

A
  • Max CPU utilisation
  • Max throughput
  • Min turnaround time
  • Min waiting time
  • Min response time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Scheduling Criteria (User Orientated) 4 points

A
  • Performance-related
  • Turnaround time
  • Response time
  • Deadlines

Other:
* Predictability

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

Scheduling Criteria (System-Orientated) 3 points

A
  • Performance-related:
  • Throughput
  • CPU Utilisation

Other:
* Fairness
* Enforcing priorities
* Balancing resources

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

Scheduling Algorithms

A
  • FCFS – First Come First Served
  • SJF – Shortest Job First
  • SRT – Shortest Response Time
  • Priority
  • HRRN – Highest Response Ratio Next
  • RR – Round Robin
  • Multi-Level Queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is asymmetric multiprocessing?

A

Only one processor accesses the system
data structures, alleviating the need for data sharing

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

What is symmetric multiprocessing (SMP)?

A

Each processor is self-scheduling, all processes in common ready queue
* or Each has its own private queue of ready processes
* Currently, most common

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

What is Processor affinity?

A
  • Processor affinity – process has affinity for processor on which it is
    currently running
  • soft affinity
  • hard affinity
  • Variations including processor sets
17
Q

What is Load balancing?

A

Load balancing attempts to keep workload evenly distributed

18
Q

What is Push migration?

A

Periodic task checks load on each processor,
pushes task from overloaded CPU to other CPUs

19
Q

What is Pull migration?

A

Pull migration – idle processors pulls waiting task from busy
processor

20
Q

Real-time Scheduling Unique requirements with respect to:

A
  • Determinism
  • Predictable behaviour guarantees deadlines are met.
  • Responsiveness
  • Immediate handling of critical events; low latency.
  • User control
  • Fine-grained control over priorities, task scheduling, and deadlines.
  • Reliability
  • Fault-tolerant operation with mechanisms to ensure no single point of
    failure.
  • Fail-soft operation
  • Graceful degradation under failure conditions, focusing on maintaining core
    functionalities and critical tasks.
21
Q

What is Real-time Scheduling?

A

Real-time computing is the “type of computing in which the
correctness of the system depends not only on the logical result of
the computation but also on the time at which the results are
produced.”