Chapter 5 - CPU Scheduling Flashcards

1
Q

What is CPU scheduling?

A

CPU scheduling is the task of selecting a waiting process from the ready queue and allocating the CPU to it. The CPU is allocated to the selected process by the dispatcher.

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

What are the two types of scheduling algorithms?

A

Scheduling algorithms may be either preemptive (where the CPU can be taken away from a process) or nonpreemptive (where a process must voluntarily relinquish control of the CPU). Almost all modern operating systems are preemptive.

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

What are the five criteria of evaluating scheduling algorithms?

A
  1. CPU utilization
  2. throughput
  3. turnaround time
  4. waiting time
  5. response time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is first-come, first-served (FCFS)?

A

First-come, first-served (FCFS) scheduling is the simplest scheduling algorithm, but it can cause short processes to wait for very long processes.

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

What is shortest-job-first (SJF)?

A

Shortest-job-first (SJF) scheduling is provably optimal, providing the shortest average waiting time. Implementing SJF scheduling is difficult, however, because predicting the length of the next CPU burst is difficult.

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

What is round-robin (RR)?

A

Round-robin (RR) scheduling allocates the CPU to each process for a time quantum. If the process does not relinquish the CPU before its time quantum expires, the process is preempted, and another process is scheduled to run for a time quantum.

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

What does priority scheduling do?

A

Priority scheduling assigns each process a priority, and the CPU is allocated to the process with the highest priority. Processes with the same priority can be scheduled in FCFS order or using RR scheduling.

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

What does multilevel queue scheduling do?

A

Multilevel queue scheduling partitions processes into several separate queues arranged by priority, and the scheduler executes the processes in the highest-priority queue. Different scheduling algorithms may be used in each queue.

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

What are multilevel feedback queues?

A

Multilevel feedback queues are similar to multilevel queues, except that a process may migrate between different queues.

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

What does load balancing on multicore systems do?

A

Load balancing on multicore systems equalized loads between CPU cores, although migrating threads between cores to balance loads may invalidate cache contents and therefore may increase memory access times.

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

What is rate-monotonic real-time scheduling?

A

Rate-monotonic real-time scheduling schedules periodic tasks using a static priority police with preemption.

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

What is earliest-deadline-first (EDF)?

A

Earliest-deadline-first (EDF) scheduling assigns priorities according to deadline. The earlier the deadline, the higher the priority; the later the deadline, the lower the priority.

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

What is proportional share scheduling?

A

Proportional share scheduling allocates T shares among all applications. If an application is allocated N shares of time, it is ensured of having N/T of the total processor time.

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

What does Linux use as a scheduler?

A

Linux uses the completely fair scheduler (CFS), which assigns a proportion of CPU processing time to each task. The proportion is based on the virtual runtime (vruntime) value associated with eachtask.

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

What does windows use to determine the order of thread scheduling?

A

Windows scheduling uses a preemptive, 32-level priority scheme to determine the order of thread scheduling.

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

What can be used to evaluate a CPU scheduling algorithm?

A

Modeling and simulations can be used to evaluate a CPU scheduling algorithm.