Linux_Scheduling Flashcards Preview

Networking > Linux_Scheduling > Flashcards

Flashcards in Linux_Scheduling Deck (23):
1

Prior to kernel version 2.5, the Linux kernel ran a variation of the traditional ....?

UNIX scheduling algorithm.

2

Two problems with the traditional UNIX scheduler are...?

that it does not provide adequate support for SMP systems and that it does not scale well as the number of tasks on the system grows.

3

With Version 2.5, the scheduler was overhauled, and the kernel now provides a scheduling algorithm that runs in...?

constant time—known as O(1)—regardless of the number of tasks on the system.

4

The newer scheduler also provides increased support for..?

SMP, including processor affinity and load balancing, as well as providing fairness and support for interactive tasks.

5

The Linux scheduler is a pre-emptive, priority-based algorithm with two separate priority ranges:

a real-time range from 0 to 99 and a nice value ranging from 100 to 140. These two ranges map into a global priority scheme wherein numerically lower values indicate higher priorities.

6

Unlike schedulers for many other systems, including Solaris and Windows XP, Linux assigns...?

higher-priority tasks longer time quanta and lower-priority tasks shorter time quanta. The relationship between priorities and time-slice length.

7

A runnable task is considered eligible for execution on the CPU as long as it has...?

time remaining in its time slice.

8

When a task has exhausted its time slice, it is considered...?

expired and is not eligible for execution again until all other tasks have also exhausted their time quanta.

9

The kernel maintains a list of all runnable tasks in a ...?

run queue data structure.

10

Because of its support for SMP, each processor maintains its own run...?

queue and schedules itself independently.

11

Each run queue contains two priority arrays...?

active and expired.

12

The active array contains all tasks with

time remaining in their time slices, and the expired array contains all expired tasks.

13

Each of these priority arrays contains a list of tasks indexed according to...?

priority.

14

The scheduler chooses the task with the...?

highest priority from the active array for execution on the CPU.

(On multiprocessor machines, this means that each processor is scheduling the highest-priority task from its own run queue structure. )

15

all tasks have exhausted their time slices (that is, the active array is empty), the...?

two priority arrays are exchanged; the expired arrya becomes the active array, and vice versa.

16

Linux implements real-time scheduling as defined by...?

POSIX.1b, which is described in Section 5.4.2.

17

Real-time tasks are assigned...?

static proprieties.

18

All other tasks have dynamic priorities that are based on their...?

nice values plus or minus the value 5.

19

The interactivity of a task determines whether the value 5 will be...?

added to or subtracted from the nice value.

20

A task’s interactivity is determined by how long it has been...?

been sleeping while waiting for I/O.

21

Tasks that are more interactive typically have longer sleep times and therefore are more likely to have ...?

adjustments closer to −5, as the scheduler favours interactive tasks.

(The result of such adjustments will be higher priorities for these tasks.)

22

Conversely, tasks with shorter sleep times are often more CPU-bound and thus will have...?

their priorities lowered.

23

A task’s dynamic priority is recalculated when the task has exhausted its...?

time quantum and is to be moved to the expired array. Thus, when the two arrays are exchanged, all tasks in the new active array have been assigned new priorities and corresponding time slices.