Chapter 7 - Scheduling: Introduction Flashcards

1
Q

5 simplifying assumptions

A
  • equal run-time for all jobs
  • simultaneous arrival Ta = 0
  • no preemption
  • CPU-only jobs
  • known run-time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

turnaround time?

A

Time from arrival to completion: T(completion) - T(arrival)

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

What does turnaround time capture?

A

How long a job spends in the system from arrival to finish

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

What is the convoy effect?

A

Short jobs wait behind long jobs, hurting responsiveness

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

When does FIFO perform poorly?

A

When job lengths vary

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

What is the main idea behind SJF?

A

Run the shortest jobs first to reduce average turnaround time

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

Is SJF preemptive?

A

No — once a job starts, it runs until completion

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

When is SJF optimal?

A

When all jobs arrive at the same time and run-times are known - not when arrival times vary

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

What is STCF?

A

A preemptive version of SJF — it allows switching to a shorter job if one arrives

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

response time formula

A

T(response) = T(firstrun) − T(arrival)

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

What is Round Robin (RR) scheduling?

A

A preemptive algorithm where each job gets a fixed time slice (quantum) to run

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

What happens when a job’s time slice ends? (RR)

A

It is preempted and placed at the back of the queue

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

advantages of RR

A
  • Good response time
  • Fairness (no CPU hogging)
  • Works well for interactive tasks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

disadvantages of RR

A
  • High context-switch overhead if time slice is too short
  • Poor turnaround time due to frequent interruptions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why is the CPU-only job assumption unrealistic?

A

Real programs use I/O for input/output and network access

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

What happens when a job performs I/O?

A

It blocks and can’t use the CPU, allowing other jobs to run

17
Q

How should the OS respond to I/O events?

A

Treat CPU bursts as separate mini-jobs to schedule effectively and avoid idle CPU time

18
Q

What is the benefit of breaking a job with I/O into sub-jobs?

A

It improves responsiveness and CPU utilization