Ask Question
26 December, 21:57

Consider a system running 10 I/O-bound processes and 2 CPU-bound process. Assume that the I/O-bound processes issue an I/O operation once for every millisecond of CPU computing and that each I/O operation takes 10 milliseconds to complete (we assume that there is no competition among I/O operations). Assume that the CPU-bound processes do not issue any I/O operations. A round-robin scheduler with quantum size 1 milliseconds is used to schedule all these 12 processes together. We assume that the context-switching overhead is 0.1 millisecond and that all processes are long-running tasks. Calculate the CPU utilization. HTML EditorKeyboard Shortcuts

+3
Answers (1)
  1. 26 December, 22:03
    0
    Answer / Explanation:

    According to question given at every 1 millisecond, i/o operation done and it will be completed in 10 ms. so 10 i/o operation have

    Time = 10 * 1 +.1 * 10 = 11ms ... (here 0.1 switching overhead)

    cpu task for which we can consider it runs for 10 ms because i/o operation will be completed in 10ms ... (given as all process are long running tasks)

    so if case 1 ... time quantum is 1ms then cpu task takes = 10*1+10*0.1 (switching after every 1ms quantum time) = 11ms

    Therefore,

    cpu utilization = useful work / total work

    = (10 * 1 + 10 * 1) / 11 + 11 = 20/22 = 90.90%

    case 2 time quantum = 10ms,

    so cpu takes = 10*1+1*.1=10.1

    cpu utilization = 20 / 11+10.1 = 20 / 21.1 = 94.78%

    For further clarity,

    We could consider the below approach for solving the question.

    (a) Time quantum is 1 ms.

    Whether a CPU bound or I/O bound process, it switches every one millisecond and when doing so, it incurs a 0.1 ms overhead. Thus, for every 1.1 ms, the CPU is actually utilized only 1 ms. So CPU utilization is 11.1 ∗ 100 = 91%

    (b) Time quantum is 10 ms.

    Here, there is a difference between CPU bound and I/O bound processes. A CPU bound process can use the full 10 ms time slot, whereas an I/O bound process can have it only for 1 ms because another I/O bound process in the queue will snatch the time from it.

    So a CPU bound process takes 10 ms, 10 I/O bound processes would take 10*1 = 10ms. So, the CPU would be utilized for a total of 20 ms out of 21.1 ms. (Total time is 10*1.1 + 10.1=21.1ms).

    Thus the CPU utilization is 2021.1∗100 = 95%
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Consider a system running 10 I/O-bound processes and 2 CPU-bound process. Assume that the I/O-bound processes issue an I/O operation once ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers