What is the CPU IO burst cycle? How does it motivate multi-programming? What does it mean for
Question:
What is the CPU IO burst cycle? How does it motivate multi-programming?
What does it mean for a process to be CPU bound or IO bound?
(b) Consider a single processor system supporting two running processes, A and B,
with the following sequential execution patterns:
A: [CPU 8 ms; IO 1 ms; CPU 8 ms; IO 1 ms; CPU 8 ms]
B: [CPU 2 ms; IO 1 ms; CPU 2 ms; IO 1 ms; CPU 2 ms]
Assume that IO operations do not interfere with each other and are blocking,
and that scheduling and context switch times are negligible.
(i) What is the total elapsed time for the two processes to run to completion?
(ii) Assume the system runs a non-preemptive scheduler where processes are
scheduled in the order in which they become runnable, and that B takes
priority over A in the event of a tie. Give the combined execution pattern
of the two processes in the format as in part (b), and determine the total
elapsed time for the two processes to run to completion. [5 marks]
(iii) Repeat part (b)(ii) with a pre-emptive scheduler operating with a time slice
of 4 ms. [5 marks]
(iv) What are the costs and the benefits of a pre-emptive over a non-preemptive
scheduler for this workload, which would you choose, and why?
Value at Risk The New Benchmark for Managing Financial Risk
ISBN: 978-0071464956
3rd edition
Authors: Philippe Jorion