Week 5 (Lec 12-13) Flashcards

Scheduling Policies (18 cards)

1
Q

What is workload in process scheduling?

A

The set of processes running on the system

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

What is turnaround time?

A

Tturnaround = Tcompletion - Tarrival.

COMPLETION - ARRIVAL

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

What is the FIFO policy?

A

First-in First-Out policy. First job to arrive is the first job o run.

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

Pros of FIFO policy?

A

Simple to implement, low overhead, works well under certain assumptions.

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

Cons of FIFO policy?

A

Convoy Effect. Short running jobs get stuck behind a long running job, resulting in poor average TURNAROUND time.

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

What is the SJF Policy?

A

Shortest Job First: Job with the shortest duration should run first/next.

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

Pros of SJF Policy

A

Solves the Convoy Effect ASSUMING all jobs arrive AT THE SAME TIME.

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

Cons of SJF Policy

A

If jobs don’t arrive at the same time, Convoy effect is still an issue.

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

What is preemptive scheduling?

A

When a scheduler can stop one process to run a different process.

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

How is preempting implemented? List a few ways/

A

Basic context switching and non-cooperative approach (a hardware timer interrupt)

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

What is STCF?

A

Shortest Time-To Completion First, basically SJF but adding preemption, allowing to switch processes in the middle of a process.

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

Pros of STCF?

A

Convoy Effect is no longer an issue.

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

Cons of STCF?

A

We don’t know how long a job will take, not great for response time.

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

What is response time?

A

Tresponse = Tfirstrun - Tarrival

The time to when it ARRIVES to The time it is SCHEDULED

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

What is the RR Policy?

A

Round Robin Policy: each job runs for a time slice before switching to the next job, continuously. The shorter the time slice, the better it is.

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

Pros of RR Policy?

A

Good for workloads where RESPONSE TIME is important. It’s also fair. (each job receives a proportional share)

17
Q

Cons of RR Policy?

A

Context switching has costs / overhead. The shorter the time slice the more time is spent on context switching and less on execution.

18
Q

Response time vs Turnaround time?

A

Turnaround: Arrival -> Completion
Response Time: Arrival -> First run