Process Scheduling
- 55Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
In general, what does scheduling mean?
In general, what does scheduling mean?
55 questions
- 1
In general, what does scheduling mean?
- A
Assigning a resource to a requester at a particular time
- B
Increasing the total number of resources available to requesters
- C
Allowing every requester to use a resource simultaneously
- D
Recording how long a requester has already used a resource
Correct answer
AAssigning a resource to a requester at a particular time
Explanation
Scheduling assigns a resource to someone who needs it and specifies when that resource will be available to them.
- A
- 2
What is the resource assigned in process scheduling, and what is assigned to it?
- A
An input device is assigned to a ready queue for processing at a particular time
- B
A memory location is assigned to a CPU for input at a particular time
- C
The CPU is assigned to a process for execution at a particular time
- D
A process is assigned to an operating system for storage at a particular time
Correct answer
CThe CPU is assigned to a process for execution at a particular time
Explanation
Process scheduling selects a process and assigns it to the CPU for execution.
- A
- 3
Why does a scheduler need to choose among processes in a ready queue?
- A
Each process requires a separate CPU, and the system has more processes than memory
- B
Many processes may be ready, while the system has a limited number of CPUs
- C
Processes in the ready queue are already executing and must be moved to storage
- D
The CPU can execute only processes that are waiting for input or output
Correct answer
BMany processes may be ready, while the system has a limited number of CPUs
Explanation
Processes compete for a limited number of CPUs, so the operating system must select which ready process gets CPU time.
- A
- 4
Which statement about the scope of process scheduling is supported by the content?
- A
The discussion of processes can also apply to threads
- B
Threads are excluded because they cannot wait for CPU time
- C
Processes and threads must always be scheduled by separate operating systems
- D
Scheduling applies to threads only when no processes are present
Correct answer
AThe discussion of processes can also apply to threads
Explanation
The content notes that the discussion of processes can also cover threads.
- A
- 5
Why is scheduling important on a heavily used service such as a mail server?
- A
It increases the number of CPUs whenever the number of users rises
- B
It guarantees that each user has a dedicated CPU at all times
- C
It helps allocate limited CPU capacity so users receive timely service
- D
It eliminates the need for processes to wait for input and output
Correct answer
CIt helps allocate limited CPU capacity so users receive timely service
Explanation
A server may have many processes competing for limited CPUs. Scheduling helps give them CPU time in a way that supports responsive service.
- A
- 6
What is the main scheduling challenge when many processes compete for a small number of CPUs?
- A
Choosing processes so they make progress without excessive delays
- B
Ensuring that every process runs continuously until all others terminate
- C
Preventing processes from entering the ready queue at the same time
- D
Making each process perform its input and output using the CPU
Correct answer
AChoosing processes so they make progress without excessive delays
Explanation
The scheduler must share limited CPU capacity among waiting processes and avoid making users wait excessively.
- A
- 7
What pattern of activity is typical of a program as it executes?
- A
A single CPU burst followed by permanent inactivity
- B
An alternating sequence of memory bursts and process termination
- C
A continuous input/output burst that does not use the CPU
- D
An alternating sequence of CPU bursts and input/output bursts
Correct answer
DAn alternating sequence of CPU bursts and input/output bursts
Explanation
Programs commonly alternate between computation on the CPU and input/output activity.
- A
- 8
What is a CPU burst?
- A
A period during which the CPU transfers data directly to a disk
- B
A period during which a process performs computation on the CPU
- C
A period during which a process waits for an input/output device
- D
A period during which a process remains in the ready queue
Correct answer
BA period during which a process performs computation on the CPU
Explanation
A CPU burst is the portion of a program's activity in which it uses the CPU to perform computation.
- A
- 9
What is an input/output burst?
- A
A period during which a process is guaranteed to remain in the ready queue
- B
A period during which a process's requested input/output activity takes place
- C
A period during which the scheduler selects a new process
- D
A period during which a process performs calculations on the CPU
Correct answer
BA period during which a process's requested input/output activity takes place
Explanation
An input/output burst is the interval associated with input/output activity, which commonly alternates with CPU bursts.
- A
- 10
Why can an input/output burst take longer than a CPU burst?
- A
Input/output bursts always include more CPU instructions than CPU bursts
- B
Input/output devices are much slower than the CPU
- C
The CPU must perform every input/output operation itself
- D
Processes are prevented from using the CPU during computation
Correct answer
BInput/output devices are much slower than the CPU
Explanation
The content emphasizes that input/output is much slower than CPU computation, so an input/output burst can take much longer.
- A
- 11
When a process is waiting for an input/output operation that proceeds between a device and memory, what can happen to the CPU?
- A
It must perform the input/output transfer instruction by instruction
- B
It must wait until the device has completed every process's input/output
- C
It can remain idle with respect to that process while the input/output proceeds
- D
It automatically terminates the process that requested the operation
Correct answer
CIt can remain idle with respect to that process while the input/output proceeds
Explanation
With mechanisms such as direct memory access, input/output can proceed between the device and memory without the CPU doing that transfer. The CPU may therefore be idle with respect to the waiting process.
- A
- 12
How can scheduling make better use of the CPU while one process is waiting for input/output?
- A
Run another process's CPU burst during the first process's input/output burst
- B
Make the first process continue computing while its input/output is pending
- C
Pause all processes until the first process's input/output burst ends
- D
Transfer the first process's input/output burst to the ready queue
Correct answer
ARun another process's CPU burst during the first process's input/output burst
Explanation
While one process waits for input/output, the scheduler can run another process that is ready to use the CPU, overlapping computation and input/output.
- A
- 13
What does the degree of multiprogramming describe?
- A
The total number of processes that have ever entered the system
- B
The number of CPUs that one process can use during a single CPU burst
- C
The maximum number of processes admitted into the system at the same time
- D
The number of input/output operations a process completes per second
Correct answer
CThe maximum number of processes admitted into the system at the same time
Explanation
The degree of multiprogramming is the maximum number of processes admitted into the system simultaneously, across states such as running, ready, and waiting.
- A
- 14
If a system has four CPUs, what is the greatest number of processes that can be running at once, according to the content?
- A
One process
- B
Four processes
- C
Any number of processes, because all can run at the same time
- D
A number equal to the degree of multiprogramming
Correct answer
BFour processes
Explanation
With four CPUs, at most four processes can be in the running state at one time, although additional processes can be ready or waiting.
- A
- 15
Which program is used as an example of a CPU-bound job?
- A
Matrix multiplication
- B
A program that only prints a short message
- C
A program that only waits for a disk operation
- D
Matrix addition
Correct answer
AMatrix multiplication
Explanation
Matrix multiplication is presented as CPU-bound because it involves roughly n3 multiplications while reading matrices of size roughly n2.
- A
- 16
Why is matrix addition used as an example of an input/output-bound job?
- A
It performs roughly n2 input/output operations and no computation
- B
It performs roughly n2 additions and has roughly n2 input/output operations
- C
It performs roughly n3 additions and has roughly n2 input/output operations
- D
It performs roughly n2 additions and has no input/output operations
Correct answer
BIt performs roughly n2 additions and has roughly n2 input/output operations
Explanation
The example characterizes matrix addition as having about n2 computations and n2 input/output operations; because input/output is relatively costly, it is input/output-bound.
- A
- 17
What scheduling benefit can come from mixing CPU-bound and input/output-bound jobs?
- A
The input/output-bound job can make the CPU perform the disk transfer
- B
Both jobs can avoid all CPU and input/output activity
- C
The CPU-bound job can eliminate the other job's need for input/output
- D
One job can use the CPU while another job is waiting for input/output
Correct answer
DOne job can use the CPU while another job is waiting for input/output
Explanation
When one job is waiting for input/output, another can use the CPU. A mix of job types can therefore help overlap computation and input/output.
- A
- 18
What is the primary context for a long-term scheduler in the content?
- A
Batch jobs that may be submitted and collected later
- B
Interrupt service routines that handle hardware events
- C
Interactive actions that require a response within a few milliseconds
- D
Input/output requests that must be completed by a device
Correct answer
ABatch jobs that may be submitted and collected later
Explanation
Long-term scheduling is associated with batch jobs, such as a large computation submitted for execution and collected later.
- A
- 19
Which situation best illustrates the short-term scheduling context described?
- A
A user taps a phone screen and expects an immediate response
- B
A user submits a simulation overnight and collects it the next morning
- C
A batch job is stored without being admitted to the system
- D
A process remains suspended while a long-term job is prepared
Correct answer
AA user taps a phone screen and expects an immediate response
Explanation
Short-term scheduling is associated with interactive systems, where actions such as tapping a mobile phone should receive prompt service.
- A
- 20
How does the invocation frequency of a short-term scheduler compare with that of a long-term scheduler?
- A
Both schedulers run only when a process terminates
- B
The short-term scheduler may run every millisecond or tens of milliseconds, while the long-term scheduler may run every seconds or minutes
- C
The short-term scheduler may run every minute, while the long-term scheduler must run every millisecond
- D
Both schedulers run at the same fixed interval of several seconds
Correct answer
BThe short-term scheduler may run every millisecond or tens of milliseconds, while the long-term scheduler may run every seconds or minutes
Explanation
The content contrasts short-term scheduling, which may be invoked every millisecond or tens of milliseconds, with long-term scheduling, which may be invoked every seconds or minutes.
- A
- 21
Where does a medium-term scheduler fit relative to the other two scheduler types?
- A
At the same level as the hardware interrupt service routine
- B
Only within the input/output device, outside the operating system
- C
After the dispatcher but before the CPU executes a process
- D
Between the short-term and long-term schedulers
Correct answer
DBetween the short-term and long-term schedulers
Explanation
The content describes the medium-term scheduler as lying between the short-term and long-term schedulers.
- A
- 22
What is the scheduler's role in the scheduling process?
- A
It switches the CPU from kernel mode to user mode by itself
- B
It performs all computation for the process selected from the queue
- C
It transfers input/output data between a device and memory
- D
It examines the queue and selects which process should be scheduled
Correct answer
DIt examines the queue and selects which process should be scheduled
Explanation
The scheduler examines the queue and decides which process should run next. The dispatcher then carries out the handoff.
- A
- 23
After the scheduler selects a process, what is the dispatcher's role?
- A
To determine how many input/output devices the system contains
- B
To choose a different process without consulting the scheduler
- C
To take the selected process and hand it control of the CPU
- D
To add every waiting process to the running state
Correct answer
CTo take the selected process and hand it control of the CPU
Explanation
The dispatcher carries out the selected process's transfer to the CPU after the scheduler has made its choice.
- A
- 24
Which description best characterizes the dispatcher?
- A
A user program that determines the arrival time of every process
- B
A queue that stores only processes that have terminated
- C
A hardware device that performs all process input/output
- D
Operating-system code that takes the CPU from one process and hands it to another
Correct answer
DOperating-system code that takes the CPU from one process and hands it to another
Explanation
The dispatcher is the operating-system code responsible for the task switch that hands the CPU to the newly scheduled process.
- A
- 25
What does dispatch latency measure?
- A
The time a process spends performing its complete input/output burst
- B
The time between a process's arrival and its termination
- C
The time a device spends transferring data to memory
- D
The time required to stop one process and start another
Correct answer
DThe time required to stop one process and start another
Explanation
Dispatch latency is the time the dispatcher takes to stop one process and start another.
- A
- 26
Which event can move a running process into the waiting state?
- A
An external interrupt occurs while the process remains ready
- B
The process requests a service and must wait for it
- C
A different process finishes its input/output operation
- D
The process completes its execution successfully
Correct answer
BThe process requests a service and must wait for it
Explanation
A running process can enter the waiting state when it requests a service, such as an input/output operation, that is not yet complete.
- A
- 27
What can happen to a running process when an external interrupt occurs?
- A
It can be moved directly from running to waiting only
- B
It must be moved from running to terminated
- C
It can be moved from running to ready
- D
It must remain running until its next input/output burst
Correct answer
CIt can be moved from running to ready
Explanation
An external interrupt can cause a running process to be moved to the ready state.
- A
- 28
What can happen when a process's requested system service finishes?
- A
The process can move from waiting to ready
- B
The process can move from waiting directly to executing without scheduling
- C
The process must remain waiting until it requests another service
- D
The process must move from waiting to terminated
Correct answer
AThe process can move from waiting to ready
Explanation
When a requested system service completes, a waiting process can become ready to run again.
- A
- 29
Which event can cause the operating system to terminate a process?
- A
An external interrupt moves the process from running to ready
- B
The process completes a normal CPU burst and requests input/output
- C
The process enters the ready queue after an input/output operation
- D
The process finishes or encounters an unrecoverable exception
Correct answer
DThe process finishes or encounters an unrecoverable exception
Explanation
A process may terminate when it completes, or when an exception such as division by zero prevents it from continuing.
- A
- 30
Why must the dispatcher switch to user mode before giving control to a user program?
- A
To let the user program save the previous process's kernel state
- B
To ensure that the user program can change the hardware timer before it starts
- C
To prevent the user program from briefly executing with kernel-level privileges
- D
To allow the user program to perform operating-system scheduling in kernel mode
Correct answer
CTo prevent the user program from briefly executing with kernel-level privileges
Explanation
The dispatcher should switch to user mode first and then give control to the program. Giving the program control before switching modes could let it execute with kernel privileges, creating a security vulnerability.
- A
- 31
What is a key distinction between non-preemptive and preemptive scheduling?
- A
Non-preemptive scheduling supports one process, while preemptive scheduling supports no processes
- B
Non-preemptive scheduling does not forcibly stop a running process, while preemptive scheduling can
- C
Non-preemptive scheduling uses a CPU, while preemptive scheduling uses only input/output devices
- D
Non-preemptive scheduling applies only to threads, while preemptive scheduling applies only to jobs
Correct answer
BNon-preemptive scheduling does not forcibly stop a running process, while preemptive scheduling can
Explanation
In non-preemptive scheduling, the operating system does not forcibly take the CPU from a running process. Preemptive scheduling allows it to do so.
- A
- 32
Under non-preemptive scheduling, when can a running process normally give up the CPU?
- A
Whenever another process enters the ready queue
- B
When it terminates, requests input/output, or completes its CPU burst
- C
Only when a user program changes from user mode to kernel mode
- D
Whenever the scheduler calculates a higher throughput value
Correct answer
BWhen it terminates, requests input/output, or completes its CPU burst
Explanation
In non-preemptive scheduling, the running process can lose the processor voluntarily, such as by terminating or requesting input/output, or after its CPU burst completes.
- A
- 33
Why is non-preemptive scheduling also described as cooperative scheduling in the content?
- A
The scheduler asks every input/output device to select the next process
- B
A hardware timer always stops the process at the end of each instruction
- C
The dispatcher allows all processes to use the CPU simultaneously
- D
The running process must give up the CPU rather than being forcibly stopped by the operating system
Correct answer
DThe running process must give up the CPU rather than being forcibly stopped by the operating system
Explanation
In cooperative scheduling, the operating system does not forcibly stop a running process; the process gives up the CPU through events such as requesting input/output or encountering a trap.
- A
- 34
What hardware mechanism is essential for preemptive scheduling as described?
- A
A hardware timer that can generate an interrupt
- B
A memory segment that changes processes into input/output devices
- C
A console that sends a message whenever a CPU burst begins
- D
A disk controller that selects processes from the ready queue
Correct answer
AA hardware timer that can generate an interrupt
Explanation
A hardware timer can interrupt the currently running process, allowing the operating system to regain control and preempt it.
- A
- 35
How can the operating system regain the CPU while a user process is running?
- A
The operating system waits until the process has finished every possible CPU burst
- B
The dispatcher sends a user-mode request that the process must approve
- C
The process's input/output device directly selects a new process without an interrupt
- D
A programmed hardware timer generates an interrupt that transfers control to an interrupt service routine
Correct answer
DA programmed hardware timer generates an interrupt that transfers control to an interrupt service routine
Explanation
The operating system programs a timer. When the timer generates a hardware interrupt, control transfers to an interrupt service routine that is part of the operating system.
- A
- 36
Which example is a trap that can cause a process to enter operating-system handling?
- A
Finishing a normal input/output operation
- B
Writing to a read-only segment
- C
Being selected by the scheduler for execution
- D
Waiting in the ready queue for CPU time
Correct answer
BWriting to a read-only segment
Explanation
Writing to a read-only segment is listed as a trap. Other examples include division by zero, stack overflow, and accessing an invalid page.
- A
- 37
What happens after hardware detects a trap caused by a process?
- A
Control transfers to an interrupt service routine in the operating system
- B
The process is guaranteed to continue in user mode without interruption
- C
The dispatcher immediately resumes the process without operating-system involvement
- D
The process is placed permanently in the ready queue
Correct answer
AControl transfers to an interrupt service routine in the operating system
Explanation
The hardware detects the trap and transfers control to an interrupt service routine, which is part of the operating system and can handle the process's exception.
- A
- 38
Why can non-preemptive execution raise security concerns?
- A
The dispatcher must run every user program in kernel mode
- B
A process is automatically given access to every other process's memory
- C
A hardware timer prevents the operating system from ever regaining control
- D
A process that cannot be forcibly interrupted may continue acting without timely operating-system intervention
Correct answer
DA process that cannot be forcibly interrupted may continue acting without timely operating-system intervention
Explanation
The content notes that a non-preemptive process cannot be interrupted while executing, which can make it harder for the operating system to control what it does.
- A
- 39
How can preemptive scheduling help reduce process starvation?
- A
It can stop a process from monopolizing the CPU and allow other processes to run
- B
It ensures that every process performs input/output at the same speed
- C
It guarantees that every process finishes in the same amount of CPU time
- D
It removes all processes from the ready queue after one CPU burst
Correct answer
AIt can stop a process from monopolizing the CPU and allow other processes to run
Explanation
Preemption allows the operating system to stop a process that would otherwise keep the CPU, giving other processes an opportunity to run within a reasonable time.
- A
- 40
Which issue is raised by preemptive scheduling in addition to deciding when to stop a process?
- A
Ensuring that input/output devices never operate while the CPU is active
- B
Eliminating the need for context switching between processes
- C
Coordinating access to shared data and deciding whether an interrupt can interrupt another interrupt
- D
Preventing any process from entering the waiting state
Correct answer
CCoordinating access to shared data and deciding whether an interrupt can interrupt another interrupt
Explanation
Preemption raises additional concerns, including coordination over shared data and whether an interrupt can itself be interrupted.
- A
- 41
Which measure describes the fraction or extent to which the CPU is kept busy?
- A
Throughput
- B
Turnaround time
- C
Response time
- D
CPU utilization
Correct answer
DCPU utilization
Explanation
CPU utilization measures how much the CPU is being used. Scheduling typically seeks to keep it high, while also considering other criteria.
- A
- 42
What does throughput measure?
- A
The time required to switch from one process to another
- B
The number of processes that complete per unit time
- C
The total time a process spends in the ready queue
- D
The time from a process's arrival until its first response
Correct answer
BThe number of processes that complete per unit time
Explanation
Throughput is the number of processes completed per unit of time.
- A
- 43
What is a process's turnaround time?
- A
The time from its arrival until its first response
- B
The time required to switch from kernel mode to user mode
- C
The time from its arrival until it finishes
- D
The time it spends waiting only in the ready queue
Correct answer
CThe time from its arrival until it finishes
Explanation
Turnaround time is the total elapsed time from arrival to completion.
- A
- 44
Which time interval is the scheduler's waiting-time concern?
- A
The time a process spends waiting in the ready queue
- B
The time a process spends waiting for an input/output device to finish
- C
The time a process spends executing its CPU instructions
- D
The time from submitting a request until its first response
Correct answer
AThe time a process spends waiting in the ready queue
Explanation
Waiting time refers to time in the ready queue. Time waiting for an input/output device depends on that device's speed rather than the scheduler's ready-queue decision.
- A
- 45
What does response time measure?
- A
The time from submitting a request until the first response is produced
- B
The time from a process's arrival until it enters the ready queue
- C
The time spent performing all CPU bursts in a process
- D
The time from submitting a request until the entire process finishes
Correct answer
AThe time from submitting a request until the first response is produced
Explanation
Response time measures how long it takes to produce the first response after a request is submitted; it does not require the complete output to be finished.
- A
- 46
For a non-preemptive process that runs once after entering the ready queue, how is its waiting time calculated?
- A
Finish time minus arrival time
- B
Arrival time minus start time
- C
Start time minus arrival time
- D
Finish time minus arrival time minus CPU time
Correct answer
CStart time minus arrival time
Explanation
For a non-preemptive process, waiting time is its start time minus its arrival time.
- A
- 47
For a preemptive process, which expression gives its total waiting time?
- A
Start time minus arrival time
- B
Finish time minus arrival time minus CPU time
- C
Arrival time plus CPU time minus finish time
- D
Finish time minus start time
Correct answer
BFinish time minus arrival time minus CPU time
Explanation
For a preemptive process, total waiting time is calculated as finish time minus arrival time minus CPU time.
- A
- 48
Which expression gives turnaround time?
- A
Arrival time minus finish time
- B
Start time minus arrival time
- C
Finish time minus arrival time
- D
Finish time minus CPU time
Correct answer
CFinish time minus arrival time
Explanation
Turnaround time is calculated as finish time minus arrival time.
- A
- 49
Which combination of goals is identified as a common scheduling objective?
- A
Minimize CPU utilization and throughput while maximizing all process times
- B
Maximize CPU utilization and throughput while minimizing turnaround, waiting, and response times
- C
Maximize waiting time and response time while minimizing throughput
- D
Keep CPU utilization fixed while ignoring process completion and response
Correct answer
BMaximize CPU utilization and throughput while minimizing turnaround, waiting, and response times
Explanation
The content lists maximizing CPU utilization and throughput, and minimizing turnaround time, waiting time, and response time as scheduling criteria.
- A
- 50
Why is high CPU utilization alone not a sufficient scheduling goal?
- A
High utilization guarantees that all processes finish at the same time
- B
A process could monopolize the CPU while other processes starve
- C
High utilization prevents the CPU from executing any input/output-bound job
- D
A process that uses the CPU continuously must have the shortest response time
Correct answer
BA process could monopolize the CPU while other processes starve
Explanation
A scheduler could keep the CPU busy by running one long process continuously, but other processes might wait excessively or starve. Throughput and other measures also matter.
- A
- 51
What does it mean to minimize variance in scheduling measures?
- A
Maximize the difference between the best and worst process outcomes
- B
Make performance more predictable rather than very fast at some times and very slow at others
- C
Ensure that every scheduling measure is always zero
- D
Make every process use exactly the same amount of CPU time
Correct answer
BMake performance more predictable rather than very fast at some times and very slow at others
Explanation
Minimizing variance means avoiding highly inconsistent results. More predictable performance helps users have confidence in the system.
- A
- 52
How can scheduling algorithms differ in their approach to average and worst-case performance?
- A
Algorithms cannot trade off average performance against worst-case behavior
- B
One may favor excellent average performance, while another may limit how bad the worst case becomes
- C
Every algorithm must optimize only the worst case and ignore average performance
- D
Every algorithm must optimize only the average case and ignore the worst case
Correct answer
BOne may favor excellent average performance, while another may limit how bad the worst case becomes
Explanation
The content describes algorithms that may emphasize strong average performance or attempt to control the worst-case outcome.
- A
- 53
Why can different users prefer different scheduling criteria?
- A
Different criteria cannot be applied to the same scheduling algorithm
- B
The purpose of the system affects which performance measure matters most
- C
Scheduling criteria depend only on the number of input/output devices
- D
All users need the same process to run first, regardless of the system
Correct answer
BThe purpose of the system affects which performance measure matters most
Explanation
The appropriate criterion depends on the system's purpose and users' needs. For example, interactive systems and batch systems value different measures.
- A
- 54
Which scheduling measure is especially important for a real-time interactive system?
- A
Response time
- B
Maximum input/output burst length
- C
Number of processes currently in the terminated state
- D
Total number of processes ever admitted
Correct answer
AResponse time
Explanation
For real-time and interactive systems, it is especially important to provide a prompt first response to a request.
- A
- 55
Which measure is particularly relevant to a user waiting for a batch simulation to finish?
- A
The length of the first input/output burst
- B
Turnaround time
- C
The number of processes in the ready queue
- D
Dispatch latency alone
Correct answer
BTurnaround time
Explanation
A user submitting a batch simulation and collecting the result later is particularly interested in how long the job takes to complete, or its turnaround time.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.