Scheduling Flashcards

(88 cards)

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
A scheduler wants to minimize _________ time, ________ time, and _______ time
turnaround, waiting, response
26
What does turnaround time measure?
amount of time to execute a process from submission to termination
27
What are the 7 scheduling algorithms?
- First come first served - Shortest Job First - Shortest Remaining Time First - Priority - Round Robin - Multilevel Queue Scheduling - Multilevel Feedback Queue Scheduling
28
In ___________________ scheduling, the processes are executed in arriving order
First come first serve
29
The average waiting time for the FCFS scheduler is very ________
dynamic
30
What does the convoy effect describe in FCFS scheduling?
short processes wait for on long process to get of CPU
31
The _______ _____ leads to low CPU and device utilization
convoy effect
32
SJF schedules the process with the _______ CPU burst time
shortest
33
What does SJF always optimize?
average waiting time for a set of processes
34
The ______ of a CPU burst is available for _____-_____ schedulers, but not ______-_____ schedulers
length, long-term, short-term
35
In ________ SJF, it predicts the next burst based on previous bursts
approximate
36
SRTF is __________
preemptive
37
In priority scheduling, the process with the ______ priority is scheduled first
highest
38
What is priority?
An integer associated with each process
39
Priority scheduling can be both _________ and ______
preemptive, non-preemptive
40
What factors are priority for a process based on?
- Time limits - Memory Requirements - Number of Open Files - External factors
41
Priority Scheduling is prone to _________, where ____ priority processes never _______
starvation, low, execute
42
A possible solution to starvation in priority scheduling is to have dynamic ______ scaling with age or something
priority
43
If priority is the inverse of CPU burst length, Priority Scheduling becomes...
SJF
44
In RR scheduling, a time quantum q is a length of _____ _______
CPU time
45
In RR scheduling, each ______ gets a small unit of ____ _______
process, CPU, time
46
In RR scheduling, after q elapses, the current process is _______ and added to the _______ ______
preempted, ready, queue
47
In RR scheduling, if there are n processes in the ready queue, how much time does each process get?
1/n
48
In RR scheduling, processes wait at most how long before executing?
(n-1)q
49
RR scheduling has a higher _______ time than ___, but has a better response time
turnaround, SJF
50
If q is ______, RR becomes like FCFS
large
51
If q is _______, RR has high overhead due to many context switches but is more responsive
small
52
A good rule of thumb for RR is that __% of CPU bursts should be shorter than q
80
53
In Multilevel Queue Scheduling, the _____ queue is partitioned into ______ queues
ready, multiple
54
In Multilevel Queue Scheduling, each queue has its own ___________ _________
scheduling algorithm
55
In Multilevel Queue Scheduling, there needs to be a master ________ that manages all the queues
scheduler
56
In Multilevel Feedback Queue Scheduling, a process can _______ ________ queues
move between
57
In Multilevel Feedback Queue Scheduling, the key idea is to move ________ to _____ priority queues if it takes too much CPU time
processes, lower
58
In Multilevel Feedback Queue Scheduling, what 4 things do we need to define?
- Number of queues - Scheduling algorithm for each queue - Method to move process up/down in queues - Start queue for each process
59
Describe the life of a long process in Multilevel Feedback Queue Scheduling
* 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
Multilevel Feedback Queue Scheduling gives higher _________ and ________
responsiveness, throughput
61
In Multiple Processor scheduling, we need to divide _____ among _______ processors
load, multiple
62
To divide the load for Multiple Processor scheduling, we can use __________ or __________ multiprocessor
asymmetric, symmetric
63
A __________ multiprocessor has one processor that ________ all others
asymmetric, schedules
64
A ________ multiprocessor has a ______ for each process
symmetric, scheduler
65
In a symmetric multiprocessor, there can be a ready queue for ___ processors, or have a _____ ready queue for each processor
all, separate
66
______ ________ is when a process runs on a processor, some data is brought in to that processor’s cache
process affinity
67
What happens when a process migrates to another processor? (4 things)
* 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
the command __________ sets processor affinity for a program
taskset
69
What is load balancing in SMP?
Ensuring load is evenly distributed among processors
70
In SMP, loads can be balanced using ____ and ____ migration
push, pull
71
What is push migration?
A specific task periodically checks load on all processors and evenly distributes it by moving tasks
72
What is pull migration?
Idle processor pulls a waiting task from a busy processor
73
An issue of SMP is making a tradeoff between _____ _______ and __________ _______
load balancing, processor affinity
74
In ______________ time systems, a task must be finished within a deadline and different schedulers are used to ensure this
hard-real
75
In ___________ time systems, tasks have no strict deadline, but should be executed quickly
soft-real
76
Soft-real time systems use what type of scheduler?
priority based with preemption
77
What are the 2 separate scheduling classes in the Completely Fair Scheduler?
Real-time processes and normal processes
78
In the CFS, _______ processes have a higher priority and uses ______ and ____ scheduling algorithms
real time, FIFO, RR
79
In the CFS, ________ processes have a lower priority and uses the ______ scheduling algorithm
CFS
80
A nice value ranges from...
-20 to 19
81
A lower nice value means ______ priority
higher
82
In the CFS, each process gets a time portion based on _____ _______
nice value
83
Nice value -20 maps to global priority ____
100
84
Nice value 19 maps to global priority _____
139
85
In the CFS, _________ ____ ____ is used to automatically determine priority
Virtual run time
86
Virtual run is calculated with _____ run time and ______
physical, decay
87
Priority is ________ proportional to virtual run time
inversely
88
______ is allowed in the virtual run time
preemption