A system runs a good mix of I/O-bound tasks and CPU-bound task. On one instance,
ID: 3699146 • Letter: A
Question
A system runs a good mix of I/O-bound tasks and CPU-bound task. On one instance, there were 5 I/O-bound tasks and 6 CPU-bound tasks. Assume that the I/O-bound tasks issue an I/O operation once for every two millisecond of CPU computing and that each I/O operation takes 10 milliseconds to complete. Also assume that the context-switching overhead is 0.5 millisecond and that all processes are long-running tasks. Describe the CPU utilization for a round-robin scheduler when:
a. The time quantum is 1 millisecond
b. The time quantum is 10 milliseconds
Explanation / Answer
Answer---
a). Given ,The time quantum is 1 millisecond.
Irrespective of which process is scheduled, the scheduler incurs a 0.1 millisecond context-switching cost for every context-switch.
This results in a CPU utilization of ====== ( 1 / 1.1 ) * 100
====== ( 1000 / 11 ) = 0.91
====== 91 %
b). Given ,The time quantum is 10 millisecond.
The I/O-bound tasks incur a context-switch after using up only 1 millisecond of the time quantum.
The time required to cycle through all the processes is therefore 10 * 1.1 + 10.1 ( as each I/O-bound task executes for 1 millisecond and then incur the context-switch task, whereas the CPU- bound task executes for 10 millisecond before incurring a context switch )
Therefore, This results in CPU Utilization of ====== ( 20 / 21.1 ) * 100
====== 20000 / 211 = 0.94
====== 94 %
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.