Question: Exercise # 1 [ 1 2 pts ] : Warm - up Consider a system that uses Round - Robin scheduling with a context -

Exercise #1[12 pts]: Warm-up
Consider a system that uses Round-Robin scheduling with a context-switching/scheduling overhead of duration 0.1ms. We represent the execution timeline of a job mix on this system by indicating 1ms of computation for a process via an uppercase letter. For example, the following string:
AAAoBoCoAAoDDD
means that process A executes for 3ms, then process B for 1ms, then process C for 1ms, then process A again for 2ms, then process D for 3ms, with appropriate context-switches in between. This example execution lasts 10ms +4*0.1ms =10.4ms (10ms of actual process execution, .4ms of context-switch overhead).
Question #1[4 pts]:
Say that the system is running 3 jobs, A, B, and C, and that all of them are CPU-intensive (i.e., each one does one infinitely long CPU burst). The system begins with A on the CPU at the beginning its time quantum while B and C are in the Ready Queue, in that order.
a) Show the execution pattern (as a string of As, Bs, C, and os) assuming that the scheduler time quantum is equal to 4 ms. Show the execution for more than 20ms (but less than 30ms).
b) In the long run (i.e, assuming jobs dont ever terminate), what percentage of the CPU time is wasted doing context-switching/scheduling?
Question #2[4 pts]
Consider the following execution on our system:
AAAAAoBBBBoCoDDDDDoAAAAAoCoDDDDDoAAAoCoDDDDDoAAAAAoBBBBB
a) Out of the four jobs, which one do you think is a more interactive process (e.g., a text editor) and why?
b) In general (not specific to the execution above), is it possible to have a job run for longer than the time quantum with a Round Robin scheduling algorithm? Explain your answer.
Question #3[4 pts]:
Consider a job mix in which there is one CPU-intensive job, A, and 3 I/O-intensive jobs, B, C, and D. The scheduler uses Round Robin scheduling with a time quantum of 3 ms. Here is an observed execution, where initially A is running and B, C, and D are in the ready queue in this order:
AAAoBBoCoDoAAAoBBoAAAoDoAAAoBBoCoDoAAAoBBo
Answer the following questions based on the above. Explain and give a specify a part of the execution.
a) Could any of As I/O-burst time be 6 ms? Explain.
b) Could any of Bs I/O-burst time be 4 ms? Explain.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!