Chapter 6 Flashcards

(53 cards)

1
Q

What is CPU scheduling?

A

The process of selecting which ready process should be executed next by the CPU.

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

What is the CPU–I/O burst cycle?

A

A process alternates between CPU bursts (execution) and I/O bursts (waiting).

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

Why is CPU scheduling important?

A

To keep the CPU busy as much as possible, improving efficiency and responsiveness.

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

What is a CPU burst?

A

The time a process spends using the CPU for computation.

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

What is an I/O burst?

A

The time a process spends waiting for input/output operations to complete.

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

What happens when a running process requests I/O?

A

It moves from the running state to the waiting state, and the CPU is assigned to another process.

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

What are the three main types of schedulers?

A

Long-term (job), Short-term (CPU), and Medium-term (swap) schedulers.

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

What does the long-term scheduler do?

A

It controls how many programs are loaded into memory at onc

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

What does the short-term scheduler do?

A

Chooses which ready process runs next on the CPU.

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

What does the medium-term scheduler do?

A

Temporarily removes processes from memory (swapping) to reduce load.

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

What is a dispatcher?

A

A module that gives control of the CPU to the process selected by the short-term scheduler.

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

What are the dispatcher’s functions?

A

Performs context switching, switches to user mode, and jumps to the proper location in the user program.

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

What is dispatcher latency?

A

The time it takes the dispatcher to stop one process and start another.

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

What is a scheduling mechanism?

A

The low-level implementation of process selection and switching.

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

What is a scheduling policy?

A

The decision-making rule for choosing which process should run next.

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

What is preemptive scheduling?

A

The CPU can be taken away from a process before it finishes its burst.

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

What is non-preemptive scheduling?

A

Once a process gets the CPU, it cannot be taken away until it finishes or waits voluntarily.

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

List five scheduling criteria.

A

CPU utilization, Throughput, Turnaround time, Waiting time, and Response time.

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

What is CPU utilization?

A

The percentage of time the CPU is busy doing useful work.

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

What is throughput?

A

The number of processes completed per unit of time.

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

What is turnaround time?

A

The total time taken from process submission to completion.

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

What is waiting time?

A

The total time a process spends waiting in the ready queue.

23
Q

What is response time?

A

The time from process submission until the first output or response.

24
Q

What is FCFS scheduling?

A

First-Come, First-Served; processes are executed in the order they arrive.

25
Is FCFS preemptive or non-preemptive?
Non-preemptive.
26
What is the main drawback of FCFS?
Convoy effect — short processes wait behind long ones.
27
What is SJF scheduling?
Shortest Job First; selects the process with the shortest next CPU burst.
28
Is SJF preemptive or non-preemptive?
It can be either; preemptive version is SRTF (Shortest Remaining Time First).
29
Why is SJF optimal?
It provides the minimum average waiting time for a given set of processes.
30
What is SRTF?
Shortest Remaining Time First; preemptive version of SJF where a new shorter job can preempt the current one.
31
What is the disadvantage of SJF/SRTF?
Starvation of long processes if short ones keep arriving.
32
What is Priority Scheduling?
Each process has a priority; CPU goes to the highest priority process.
33
What is a problem with priority scheduling?
Starvation — low-priority processes may never execute.
34
How can starvation be fixed in priority scheduling?
Using aging — gradually increasing the priority of waiting processes.
35
What is Round Robin (RR) scheduling?
Each process gets a small time slice (quantum) and is preempted after that time expires.
36
What is the key benefit of Round Robin?
Good response time for interactive users.
37
What is the effect of a very large quantum in RR?
It behaves like FCFS scheduling.
38
What is the effect of a very small quantum in RR?
Too many context switches cause high overhead.
39
What is a multilevel queue?
A scheduling method where processes are divided into multiple queues based on priority or type.
40
How does a multilevel queue scheduler work?
Each queue may use its own algorithm (e.g., RR for foreground, FCFS for background).
41
What problem can occur in multilevel queues?
Starvation of lower-priority queues if upper queues dominate.
42
What is a multilevel feedback queue?
A dynamic scheduling system where processes can move between queues based on behavior.
43
What is the advantage of multilevel feedback queues?
It adapts to process behavior and prevents starvation.
44
What is asymmetric multiprocessing?
One CPU controls all scheduling and I/O, while others only run user processes.
45
What is symmetric multiprocessing (SMP)?
Each processor is self-scheduling and may use a common or private ready queue.
46
What is processor affinity?
A tendency for a process to stay on the same CPU to improve cache performance.
47
What are the two types of processor affinity?
Soft affinity (preferred CPU) and hard affinity (fixed CPU).
48
What is load balancing?
Distributing processes evenly among CPUs to prevent some from being overloaded.
49
What are the two types of load balancing?
Push migration (moves tasks from busy CPUs) and pull migration (idle CPUs steal tasks).
50
What is context switching?
Saving the state of one process and loading the state of another during scheduling.
51
How does preemption affect synchronization?
Preemptive scheduling can interrupt processes in critical sections, causing race conditions if not managed carefully.
52
Which scheduling algorithm gives the best response time?
Round Robin with a properly chosen time quantum.
53
Which scheduling algorithm minimizes average waiting time?
Shortest Job First (SJF).