Lecture 8: CPU Scheduling 2 Flashcards

1
Q

Shortest-Job-First (SJF) - Non-Preemptive Policy

A

Rank processes by CPU time requests.

Optimizes (minimizes) average waiting time

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

Shortest-Job-First (SJF) - Preemptive Policy

A

Currently running process can be preempted if new process arrives with shorter remaining CPU burst

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

Exponential Averaging

A

Uses “history” of previous CPU bursts to predict length of next CPU burst
tn:Actual length of nth CPU burst
tn+1: Predicted length of next CPU burst
ɑ:“Weight”:
→ How much emphasis to put on recent past
→ 0 ≤ a ≤1

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

States in the Ready Queue

A

New: Process is being created
Running: Instructions are being executed
Waiting: Process is waiting for some event to occur
Ready: Process is waiting to be assigned the CPU
Terminated: Process has finished execution

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

Priority Policy

A

•Priority Number (Integer) Associated With Each Process
•CPU Allocated to Process With Highest Priority (Lowest Priority Number)…
3a. Non-preemptive:
Whenever running process blocks or terminates
3b. Preemptive:
Whenever new process arrives or running process blocks or terminates

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

Round-Robin

A

•Each process gets small unit of CPU time (time quantum).
•After time quantum has elapsed, process is
preempted and added to end of ready queue
•Preemptive only: Process switch based on timer interrupts

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

Multilevel Queues

A

Ready queue is partitioned into separate queues, each with own scheduling algorithm

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

Inter-queue Scheduling (Scheduling of Queues)

A
  1. Fixed Priority:
    Serve all from high-priority queue before servicing lower-priority
    queue (–: starvation)
  2. Time-slice:
    Each queue gets reserved slice of CPU time to schedule amongst its
    processes (e.g.: 80% for hi-priority, 20% low)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Scheduling Metrics

A
  • CPU utilization, throughput, turnaround time, wait time, response time
  • Also care about: fairness, dispatch time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly