ch05 lab 3
ch05 lab 3
Chapter: Chapter 5
Multiple Choice
Ans: B
Feedback: 5.1.3
Difficulty: Medium
2. ____ is the number of processes that are completed per time unit.
A) CPU utilization
B) Response time
C) Turnaround time
D) Throughput
Ans: D
Feedback: 5.2
Difficulty: Medium
3. ____ scheduling is approximated by predicting the next CPU burst with an
exponential average of the measured lengths of previous CPU bursts.
A) Multilevel queue
B) RR
C) FCFS
D) SJF
Ans: D
Feedback: 5.3.2
Difficulty: Medium
Ans: C
Feedback: 5.3.4
Difficulty: Medium
Ans: C
Feedback: 5.3.1
Difficulty: Medium
Ans: B
Feedback: 5.3.5
Difficulty: Medium
Ans: A
Feedback: 5.7.3
Difficulty: Easy
8. Which of the following statements are false with regards to the Linux CFS
scheduler?
A) Each task is assigned a proportion of CPU processing time.
B) Lower numeric values indicate higher relative priorities.
C) There is a single, system-wide value of vruntime.
D) The scheduler doesn't directly assign priorities.
Ans: C
Feedback: 5.7.1
Difficulty: Easy
Ans: B
Feedback: 5.7.1
Difficulty: Medium
Ans: B
Feedback: 5.7.2
Difficulty: Medium
Ans: C
Section: 5.7.3
Difficulty: Easy
12. In Solaris, if an interactive thread with priority 15 uses its entire time
quantum, what is its priority recalculated to?
A) 51
B) 5
C) 160
D) It remains at 15
Ans: B
Feedback: 5.7.3
Difficulty: Easy
13. In Solaris, if an interactive thread with priority 25 is waiting for I/O, what
is its priority recalculated to when it is eligible to run again?
A) 15
B) 120
C) 52
D) It remains at 25
Ans: C
Feedback: 5.7.3
Difficulty: Easy
Ans: A
Feedback: 5.5.2
Difficulty: Medium
Ans: B
Feedback: 5.7.2
Difficulty: Easy
Ans: D
Feedback: 5.7.2
Difficulty: Easy
Ans: A
Feedback: 5.7.2
Difficulty: Easy
18. __________ involves the decision of which kernel thread to schedule onto
which CPU.
A) Process-contention scope
B) System-contention scope
C) Dispatcher
D) Round-robin scheduling
Ans: B
Feedback: 5.4.1
Difficulty: Easy
Ans: A
Feedback: 5.5.4
Difficulty: Medium
Ans: B
Feedback: 5.3.3
Difficulty: Medium
Ans: C
Feedback: 5.3.1
Difficulty: Medium
22. The rate of a periodic task in a hard real-time system is ____, where p is
a period and t is the processing time.
A) 1/p
B) p/t
C) 1/t
D) pt
Ans: A
Section: 5.6.2
Difficulty: Medium
Ans: C
Section: 5.6.3
Difficulty: Difficult
25. The two general approaches to load balancing are __________ and
____________.
A) soft affinity, hard affinity
B) coarse grained, fine grained
C) soft real-time, hard real-time
D) push migration, pull migration
Ans: D
Section: 5.5.3
Difficulty: Medium
Essay
Ans: The dispatcher gives control of the CPU to the process selected by the
short-term scheduler. To perform this task, a context switch, a switch to user
mode, and a jump to the proper location in the user program are all required.
The dispatch should be made as fast as possible. The time lost to the
dispatcher is termed dispatch latency.
Feedback: 5.1.4
Difficulty: Medium
29. Explain the difference between response time and turnaround time.
These times are both used to measure the effectiveness of scheduling
schemes.
Ans: Turnaround time is the sum of the periods that a process is spent
waiting to get into memory, waiting in the ready queue, executing on the
CPU, and doing I/O. Turnaround time essentially measures the amount of
time it takes to execute a process. Response time, on the other hand, is a
measure of the time that elapses between a request and the first response
produced.
Feedback: 5.2
Difficulty: Medium
30. What effect does the size of the time quantum have on the performance
of an RR algorithm?
Ans: At one extreme, if the time quantum is extremely large, the RR policy
is the same as the FCFS policy. If the time quantum is extremely small, the
RR approach is called processor sharing and creates the appearance that
each of n processes has its own processor running at 1/n the speed of the
real processor.
Feedback: 5.3.4
Difficulty: Medium
31. Explain the process of starvation and how aging can be used to prevent
it.
Ans: Starvation occurs when a process is ready to run but is stuck waiting
indefinitely for the CPU. This can be caused, for example, when higher-
priority processes prevent low-priority processes from ever getting the CPU.
Aging involves gradually increasing the priority of a process so that a process
will eventually achieve a high enough priority to execute if it waited for a
long enough period of time.
Feedback: 5.3.3
Difficulty: Difficult
Ans: With push migration, a specific task periodically checks the load on
each processor and — if it finds an imbalance—evenly distributes the load by
moving processes from overloaded to idle or less-busy processors. Pull
migration occurs when an idle processor pulls a waiting task from a busy
processor. Push and pull migration are often implemented in parallel on load-
balancing systems.
Feedback: 5.5.3
Difficulty: Medium
34. In Windows, how does the dispatcher determine the order of thread
execution?
36. What are the two types of latency that affect the performance of real-
time systems?
Ans: Interrupt latency refers to the period of time from the arrival of an
interrupt at the CPU to the start of the routine that services the interrupt.
Dispatch latency refers to the amount of time required for the scheduling
dispatcher to stop one process and start another.
Section: 5.6.1
Difficulty: Medium
37. What are the advantages of the EDF scheduling algorithm over the rate-
monotonic scheduling algorithm?
Ans: Unlike the rate-monotonic algorithm, EDF scheduling does not require
that processes be periodic, nor must a process require a constant amount of
CPU time per burst. The appeal of EDF scheduling is that it is theoretically
optimal - theoretically, it can schedule processes so that each process can
meet its deadline requirements and CPU utilization will be 100 percent.
Section: 5.6.4
Difficulty: Medium
True/False
Ans: True
Feedback: 5.1.3
Difficulty: Medium
39. In RR scheduling, the time quantum should be small with respect to the
context-switch time.
Ans: False
Feedback: 5.3.4
Difficulty: Medium
Ans: True
Feedback: 5.3.6
Difficulty: Medium
Ans: False
Feedback: 5.5.3
Difficulty: Medium
Ans: False
Feedback: 5.4.1
Difficulty: Easy
Ans: False
Feedback: 5.7
Difficulty: Medium
44. A Solaris interactive thread with priority 15 has a higher relative priority
than an interactive thread with priority 20
Ans: False
Feedback: 5.7.3
Difficulty: Easy
Ans: True
Feedback: 5.7.3
Difficulty: Easy
46. SMP systems that use multicore processors typically run faster than SMP
systems that place each processor on separate cores.
Ans: True
Feedback: 5.5.4
Difficulty: Easy
Ans: True
Feedback: 5.7.2
Difficulty: Medium
Ans: True
Feedback: 5.3.4
Difficulty: Easy
49. Load balancing algorithms have no impact on the benefits of processor
affinity.
Ans: False
Feedback: 5.5.3
Difficulty: Medium
50. A multicore system allows two (or more) threads that are in compute
cycles to execute at the same time.
Ans: True
Feedback: 5.5.4
Difficulty: Easy
Ans: False
Section: 5.6
Difficulty: Difficult
Ans: True
Section: 5.6.1
Difficulty: Medium
Ans: False
Section: 5.6.6
Difficulty: Medium
54. In the Linux CFS scheduler, the task with smallest value of vruntime is
considered to have the highest priority.
Ans: True
Section: 5.7.1
Difficulty: Medium
55. The length of a time quantum assigned by the Linux CFS scheduler is
dependent upon the relative priority of a task.
Ans: False
Section: 5.7.1
Difficulty: Medium
56. The Completely Fair Scheduler (CFS) is the default scheduler for Linux
systems.
Ans: True
Section: 5.7.1
Difficulty: Medium