chapter 9 - Scheduling: Proportional Share Flashcards

1
Q

tickets

A

represents a process’s share of a resource - like CPU

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

how does lottery scheduling choose who runs

A

pick a random ticket each time slice - owner of ticket wins

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

If Process A has 75 tickets and B has 25, how is CPU time divided?

A

A gets 75% of the CPU, B gets 25%

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

What is ticket currency?

A

A user can divide their global ticket share into local tickets for their own jobs

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

What is ticket transfer?

A

A process gives its tickets temporarily to another (e.g., client to server)

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

What is ticket inflation?

A

A process temporarily increases its own ticket count to gain more CPU — only safe in trusted environments

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

What is the risk of ticket inflation in untrusted environments?

A

A greedy process could dominate the CPU unfairly

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

how does scheduler select a process in lottery scheduling

A

pick random number from 0 to total-1- walk the list and sum ticket values - first process where cumulative exceeds the random number wins

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

unfairness metric U represent

A

U = time job 1 completes/ time job 2 completes – U = 1 is fair

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

Why doesn’t lottery scheduling guarantee fairness in the short term?

A

Because of its random nature - fairness only emerges over time

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

What is stride scheduling?

A

A deterministic alternative to lottery scheduling that uses strides and pass values to control CPU access

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

how is stride and pass calculated

A
  • stride = large number / tickets
  • pass += stride
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how does a scheduler pick a job in stride scheduling

A

pick the job with lowest pass value

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

downside of stride scheduling

A
  • requires global state
  • hard to set fair initial pass for new job
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

how does lottery scheduling avoid strides downside

A

It uses a single global ticket pool, making it easier to add/remove jobs dynamically

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