10. Simple Schedulers Flashcards

1
Q

What three pieces of information do some simple schedulers use to decide which thread to run next?

A

What will happen next, what just happened, and what does the user want

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

Describe the steps of random scheduling

A

First, choose a scheduling quantum (max amount of time a thread can run).

Second, choose a thread at random from the ready pile and run the thread until it blocks or the scheduling quantum expires.

Note: When a thread leaves the waiting state, it simply returns to the ready pile.

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

Describe the steps of round-robin scheduling.

A

First, choose a scheduling quantum (max amount of time a thread can run).

Second, establish an ordered ready queue (ex: when a thread is created add it to the tail of the ready queue).

Third, choose the thread at the head of the ready queue, run the thread until it blocks or its quantum expires, and if its quantum expires, place it at the tail of the ready queue.

Note: If a thread leaves the waiting state, put it either at the head or tail of the queue (be consistent)

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

What does it mean to be a “know nothing” scheduling algorithm?

A

They require no information about a thread’s past, present, or future, and they accept no user input.

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

What are some examples of know nothing scheduling algorithms?

A

Random and Round Robin schedulers.

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

What are the problems with know-nothing schedulers?

A

They fail to reward threads that voluntarily give up the CPU before their quantum expires and they are not capable of prioritizing important threads.

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

What kind of future-facing information might we want to know about a thread when making scheduling decisions?

A

How long it is going to use the CPU, whether it will block or yield, and how long the thread will need to wait if it blocks

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

Why would we prefer threads that give up the CPU before their time quantum ends?

A

they are probably waiting for something else (like a disc read), which can be done in parallel with CPU use

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

Describe the shortest-job first scheduling algorithm and why it is useful.

A

Shortest-job first schedules jobs in order of increasing runtime. This minimizes the total waiting time of all the processes that need to run.

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

What is MLFQ scheduling?

A

MLFQ stands for multi-level feedback queues. This type of scheduler employs multiple queues, each representing a priority.

The rotating staircase scheduler, developed by Con Kolivas is an example of an MLFQ scheduler.

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