Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A system runs a good mix of I/O-bound tasks and CPU-bound task. On one instance,

ID: 3699862 • 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

(a) The time quantum is 1 millisecond:

Irrespective of which process is scheduled, the scheduler incurs a 0.5 millisecond context-switching cost for every context-switch. This results in a CPU utilization of 1/1.5 * 100 = 66.6%.

(b) The time quantum is 10 milliseconds: The I/O-bound tasks incur a context switch after using up 2 milliseconds of the time quantum. The time required to cycle through all the processes is therefore 10*1.2 + 10.5 (as each I/O-bound task executes for 2 millisecond and then incur the context switch task, whereas the CPU-bound task executes for 10 milliseconds before incurring a context switch). The CPU utilization is therefore 20/22.5 * 100 = 80%.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote