Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise #1 [25 pts + 10 pts] Consider an OS that schedules jobs with a single Round-Robin queue. The context-switching overhead is o-0.1ms. We represent

image text in transcribed

image text in transcribed

Exercise #1 [25 pts + 10 pts] Consider an OS that schedules jobs with a single Round-Robin queue. The context-switching overhead is o-0.1ms. We represent the execution timeline of a job mix on this system by indicating 1ms of computation for a job via an uppercase letter (we assume that the time quantum and the CPU bursts are integral numbers of ms). For example, the following string: AAAoBoCOAAoDDD means that job A executes for 3ms, then job B for 1ms, then job C for 1ms, then job A again for 2ms, then job D for 3ms, with appropriate context-switches in between. This example execution lasts 10ms + 4x0.1 ms = 10.4ms (10ms of actual job execution, .4ms of context-switch overhead). Question #2 [10 pts + 10 pts] Assume a job mix with 5 VO-bound jobs and 1 fully CPU-bound job. The fully CPU-bound job is just one infinitely long CPU burst. Each I/O-bound job has a CPU burst of 1ms and then an /O burst of 4ms, and repeats this burst cycle ad infinitum. Assuming that the time quantum is 4ms, we reason on steady-state execution (i.e., we consider the behavior of the workload in the long run). We assume that the ready queue contains the VO jobs followed by the CPU job (i.e., the first time around, all I/O jobs will run before the CPU job). Answer these questions: [q1] write the ASCII representation of the execution of the job mix as in Question #1, using i to denote 1 ms of execution of any of the l/O-bound jobs, and C to denote 1ms of execution of the CPU-bound job, and o to denote a 0.1ms context-switch overhead. Your answer should look like this "lolCoCCololoCo" (this is a very wrong answer though). Even though the execution is infinite, you should identify a repeating pattern. Your answer should only be this pattern, finishing with a "o [q2 (EXTRA CREDIT)) What is the number of consecutive milliseconds an l/O-bound job spends in the READY state? Show your work. [Q3 (EXTRA CREDIT)) How small should the context-switching overhead be so that 2% of the time is spent doing context switching? Show your work Exercise #1 [25 pts + 10 pts] Consider an OS that schedules jobs with a single Round-Robin queue. The context-switching overhead is o-0.1ms. We represent the execution timeline of a job mix on this system by indicating 1ms of computation for a job via an uppercase letter (we assume that the time quantum and the CPU bursts are integral numbers of ms). For example, the following string: AAAoBoCOAAoDDD means that job A executes for 3ms, then job B for 1ms, then job C for 1ms, then job A again for 2ms, then job D for 3ms, with appropriate context-switches in between. This example execution lasts 10ms + 4x0.1 ms = 10.4ms (10ms of actual job execution, .4ms of context-switch overhead). Question #2 [10 pts + 10 pts] Assume a job mix with 5 VO-bound jobs and 1 fully CPU-bound job. The fully CPU-bound job is just one infinitely long CPU burst. Each I/O-bound job has a CPU burst of 1ms and then an /O burst of 4ms, and repeats this burst cycle ad infinitum. Assuming that the time quantum is 4ms, we reason on steady-state execution (i.e., we consider the behavior of the workload in the long run). We assume that the ready queue contains the VO jobs followed by the CPU job (i.e., the first time around, all I/O jobs will run before the CPU job). Answer these questions: [q1] write the ASCII representation of the execution of the job mix as in Question #1, using i to denote 1 ms of execution of any of the l/O-bound jobs, and C to denote 1ms of execution of the CPU-bound job, and o to denote a 0.1ms context-switch overhead. Your answer should look like this "lolCoCCololoCo" (this is a very wrong answer though). Even though the execution is infinite, you should identify a repeating pattern. Your answer should only be this pattern, finishing with a "o [q2 (EXTRA CREDIT)) What is the number of consecutive milliseconds an l/O-bound job spends in the READY state? Show your work. [Q3 (EXTRA CREDIT)) How small should the context-switching overhead be so that 2% of the time is spent doing context switching? Show your work

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions