9. Lottery Scheduling Flashcards

1
Q

What is proportional-share?

A

It is when a scheduler tries to guarantee that each job obtain a certain percentage of CPU time

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

What is lottery scheduling?

A

Using a random lottery system to decide which process should run next

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

What are tickets?

A

The share of a resource that a process should receive

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

What are the three ticket mechanisms?

A

Ticket currency: Allows user to allocate tickets among their own jobs. The system will then convert it to a global value.

Ticket transfer: A process can temporarily hand off it tickets to another process

Ticket inflation: A process can temporarily raise or lower the number of tickets it owns

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

What is the fairness metric?

A

The time the first job completes divided by the time the second job completes

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

What is a stride?

A

A stride is inversely proportional to the number of tickets where a large number is divided by the number of tickets

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

How does a stride scheduling algorithm work?

A

At each iteration, it will take the process with the smallest pass value. Once it runs, the process pass value will be increased by its stride value

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

How does the Completely Fair Scheduler (CFS) work?

A

It is based on a counting technique known as virtual runtime. The scheduler will pick the one with the lowest vruntime.

The CFS has two metrics:
- scheu_latency: how long does a process run before considering a switch
- min_granularity: minimum amount of time a process should run before considering a switch

CFS also has a nice metric to prioritise jobs.

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

What data structure does CFS use?

A

Red black trees are used to store the vruntime of running processes.

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

How does CFS handle processes who are going through I/O or sleep?

A

CFS will assign the lowest vruntime to them when they are ready to be executed

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