PM
CMPE320 EXAM 2 questions and answers with complete
solutions verified latest update
Terms in this set (138)
A CPU scheduling n!
algorithm determines an
order for the execution
of its scheduled
processes. Given n
processes to be
scheduled on one
processor, how many
different schedules are
possible?
Explain the difference Preemptive = Process can be interrupted
between preemptive and Non-preemptive = Process cannot be interrupted
non-preemptive
scheduling
1/40
,7/7/25, 5:32
PM
What is the equation for Turnaround Time = Finish Time - Arrival Time
Turnaround Time?
What is the equation for Waiting Time = Turnaround Time - Burst Time
Waiting Time?
Explain First Come First Processes run in the order they arrive.
Serve (FCFS) Scheduling
Explain Shortest Job First The job with the shortest burst time runs first.
(SJF) Scheduling
How does SJF If you allow preemption, then if a job arrives
Scheduling change if that is shorter than the current one running,
you allow it will interrupt the current job and run the
preemption? new shorter job.
Explain Round Robin (RR) Algorithm has a quantum time and takes
Scheduling turns running each job in the order they
arrived for the length of the quantum
time.
What advantage is there The advantage is that only allot a large amount
in having different time- of CPU time to processes that are taking forever.
quantum sizes at So if a job is very short, it doesn't have any busy
different levels of
multilevel queuing
system?
2/40
,7/7/25, 5:32
PM
How much does FCFS If long processes gets in first, then later short ones will
scheduling hang.
algorithms discriminate in
favor of short processes?
How much does RR Short processes can finish early depending on the
scheduling algorithms quantum time.
discriminate in favor of
short processes?
How much do multilevel Same as Round Robin
feedback queues
scheduling algorithms Short processes can finish early depending on the
discriminate in favor quantum time.
of short processes?
Which of the following is B. A process keeps the CPU until it releases
true of cooperative the CPU either by terminating or by
scheduling? switching to a waiting state.
A. It requires a timer
B. A process keeps
3/40
, 7/7/25, 5:32
PM
the CPU until it releases
the CPU either by
terminating or by
switching to a waiting
state
C. It incurs a cost
associated with access
to shared data
D. A process switches from
running state to
the ready state when an
interrupt occurs.
___ is the number of D. Throughput
processes that are
completed per time
unit.
A. CPU Utilization
B. Response Time
4/40