Scheduling Flashcards

1
Q

What is multiprogramming?

A

Keeping multiple programs in memory and running them so that CPU use is high

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

Most _______ will not be busy all the time

A

programs

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

_________ algorithms increase CPU use by switching between tasks

A

scheduling

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

An I/O-bound process/thread spends more time in ____

A

I/O

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

An example of an I/O bound process is …

A

web server connection handling

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

An CPU-bound process/thread pends more time in…

A

CPU

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

An example of a CPU-bound process is…

A

scientific computing

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

A long-term scheduler is also known as a ____ ________

A

job scheduler

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

a Long-term scheduler selects which processes should be brought into the ______ ______

A

ready queue

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

a Long-term scheduler controls the degree of _________________

A

multiprogramming

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

a Long-term scheduler is invoked _________

A

infrequently

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

a Long-term scheduler should have a good mix of __________ and ________ jobs in the system

A

CPU-Bound, I/O-bound

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

A short-term scheduler is also known as a ____ ________

A

CPU scheduler

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

A short-term scheduler selects which process should be executed next and allocates _____ to it

A

CPU

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

A short-term scheduler is invoked _________

A

frequently

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

A _______-term scheduler swaps processes in and out of ready queue to enhance performance

A

medium

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

Non-preemptive scheduling makes it so that once a process is __________ a CPU, it does not _______ unless it has to _____ or it ________

A

allocated, leave, wait, terminates

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

Preemptive scheduling makes it so that the __ can force a process from CPU at __________

A

OS, anytime

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

An OS will preempt a process when there is another _______ ______ process

A

higher priority

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

________ scheduling is harder to implement because data _______ needs to be maintained between processes and _____ data structures

A

preemptive, consistency, kernel

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

What does a dispatcher do?

A

Allocates CPU to a process selected by a scheduler to run

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

What steps are involved in the dispatcher allocates CPU?

A
  • Switch context
  • Switch to user mode
  • Jumping to the proper location in the selected process and starting it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

________ _______ is the time taken for the dispatcher to stop one process and start another

A

dispatch latency

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

A scheduler wants to maximize ___ ____________ and _________

A

CPU, utilization, throughput

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

A scheduler wants to minimize _________ time, ________ time, and _______ time

A

turnaround, waiting, response

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

What does turnaround time measure?

A

amount of time to execute a process from submission to termination

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

What are the 7 scheduling algorithms?

A
  • First come first served
  • Shortest Job First
  • Shortest Remaining Time First
  • Priority
  • Round Robin
  • Multilevel Queue Scheduling
  • Multilevel Feedback Queue Scheduling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

In ___________________ scheduling, the processes are executed in arriving order

A

First come first serve

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

The average waiting time for the FCFS scheduler is very ________

A

dynamic

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

What does the convoy effect describe in FCFS scheduling?

A

short processes wait for on long process to get of CPU

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

The _______ _____ leads to low CPU and device utilization

A

convoy effect

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

SJF schedules the process with the _______ CPU burst time

A

shortest

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

What does SJF always optimize?

A

average waiting time for a set of processes

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

The ______ of a CPU burst is available for _____-_____ schedulers, but not ______-_____ schedulers

A

length, long-term, short-term

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

In ________ SJF, it predicts the next burst based on previous bursts

A

approximate

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

SRTF is __________

A

preemptive

37
Q

In priority scheduling, the process with the ______ priority is scheduled first

A

highest

38
Q

What is priority?

A

An integer associated with each process

39
Q

Priority scheduling can be both _________ and ______

A

preemptive, non-preemptive

40
Q

What factors are priority for a process based on?

A
  • Time limits
  • Memory Requirements
  • Number of Open Files
  • External factors
41
Q

Priority Scheduling is prone to _________, where ____ priority processes never _______

A

starvation, low, execute

42
Q

A possible solution to starvation in priority scheduling is to have dynamic ______ scaling with age or something

A

priority

43
Q

If priority is the inverse of CPU burst length, Priority Scheduling becomes…

A

SJF

44
Q

In RR scheduling, a time quantum q is a length of _____ _______

A

CPU time

45
Q

In RR scheduling, each ______ gets a small unit of ____ _______

A

process, CPU, time

46
Q

In RR scheduling, after q elapses, the current process is _______ and added to the _______ ______

A

preempted, ready, queue

47
Q

In RR scheduling, if there are n processes in the ready queue, how much time does each process get?

A

1/n

48
Q

In RR scheduling, processes wait at most how long before executing?

A

(n-1)q

49
Q

RR scheduling has a higher _______ time than ___, but has a better response time

A

turnaround, SJF

50
Q

If q is ______, RR becomes like FCFS

A

large

51
Q

If q is _______, RR has high overhead due to many context switches but is more responsive

A

small

52
Q

A good rule of thumb for RR is that __% of CPU bursts should be shorter than q

A

80

53
Q

In Multilevel Queue Scheduling, the _____ queue is partitioned into ______ queues

A

ready, multiple

54
Q

In Multilevel Queue Scheduling, each queue has its own ___________ _________

A

scheduling algorithm

55
Q

In Multilevel Queue Scheduling, there needs to be a master ________ that manages all the queues

A

scheduler

56
Q

In Multilevel Feedback Queue Scheduling, a process can _______ ________ queues

A

move between

57
Q

In Multilevel Feedback Queue Scheduling, the key idea is to move ________ to _____ priority queues if it takes too much CPU time

A

processes, lower

58
Q

In Multilevel Feedback Queue Scheduling, what 4 things do we need to define?

A
  • Number of queues
  • Scheduling algorithm for each queue
  • Method to move process up/down in queues
  • Start queue for each process
59
Q

Describe the life of a long process in Multilevel Feedback Queue Scheduling

A
  • New job enters Q0
  • Gets8 ms (RR)
  • If it does not finish, move to Q1
  • More 16 ms (RR)
  • If still needs more, moved to Q2
  • Will run until it finishes (FCFS)
60
Q

Multilevel Feedback Queue Scheduling gives higher _________ and ________

A

responsiveness, throughput

61
Q

In Multiple Processor scheduling, we need to divide _____ among _______ processors

A

load, multiple

62
Q

To divide the load for Multiple Processor scheduling, we can use __________ or __________ multiprocessor

A

asymmetric, symmetric

63
Q

A __________ multiprocessor has one processor that ________ all others

A

asymmetric, schedules

64
Q

A ________ multiprocessor has a ______ for each process

A

symmetric, scheduler

65
Q

In a symmetric multiprocessor, there can be a ready queue for ___ processors, or have a _____ ready queue for each processor

A

all, separate

66
Q

______ ________ is when a process runs on a processor, some data is brought in to that processor’s cache

A

process affinity

67
Q

What happens when a process migrates to another processor? (4 things)

A
  • Cache of new processor has to be re-populated
  • Cache of old processor has to be invalidated
  • Performance penalty
  • Extra interconnect traffic (NUMA effect)
68
Q

the command __________ sets processor affinity for a program

A

taskset

69
Q

What is load balancing in SMP?

A

Ensuring load is evenly distributed among processors

70
Q

In SMP, loads can be balanced using ____ and ____ migration

A

push, pull

71
Q

What is push migration?

A

A specific task periodically checks load on all processors and evenly distributes it by moving tasks

72
Q

What is pull migration?

A

Idle processor pulls a waiting task from a busy processor

73
Q

An issue of SMP is making a tradeoff between _____ _______ and __________ _______

A

load balancing, processor affinity

74
Q

In ______________ time systems, a task must be finished within a deadline and different schedulers are used to ensure this

A

hard-real

75
Q

In ___________ time systems, tasks have no strict deadline, but should be executed quickly

A

soft-real

76
Q

Soft-real time systems use what type of scheduler?

A

priority based with preemption

77
Q

What are the 2 separate scheduling classes in the Completely Fair Scheduler?

A

Real-time processes and normal processes

78
Q

In the CFS, _______ processes have a higher priority and uses ______ and ____ scheduling algorithms

A

real time, FIFO, RR

79
Q

In the CFS, ________ processes have a lower priority and uses the ______ scheduling algorithm

A

CFS

80
Q

A nice value ranges from…

A

-20 to 19

81
Q

A lower nice value means ______ priority

A

higher

82
Q

In the CFS, each process gets a time portion based on _____ _______

A

nice value

83
Q

Nice value -20 maps to global priority ____

A

100

84
Q

Nice value 19 maps to global priority _____

A

139

85
Q

In the CFS, _________ ____ ____ is used to automatically determine priority

A

Virtual run time

86
Q

Virtual run is calculated with _____ run time and ______

A

physical, decay

87
Q

Priority is ________ proportional to virtual run time

A

inversely

88
Q

______ is allowed in the virtual run time

A

preemption