Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! Please Help Me! Help is greatly appreciated. Please explain your answers, Thank you. Exercise #1 [25 pts + 10 pts Consider an OS that

Hello! Please Help Me! Help is greatly appreciated. Please explain your answers, Thank you.

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.1ms Question #1 [15pts). Consider the following execution: 10.4ms (10ms of actual job execution, .4ms of context-switch overhead). AAAAAoBBoCoDDDDDOAADDDDoAAAAAoBBB DDDDDOA AAoCoD Answer the following questions: [q1] Knowing that there is at least one CPU-bound job in this mix, could the time quantum be 6ms? why? [q2] Which job seems to have the longest I/O burst? Why? [q3] Knowing that one of this jobs is a text editor, which job do you think it is? Why? Question #2 [15 pts + 10 pts] Assume a job mix with 5 1/O-bound jobs and 1 fully CPU-bound job. The fully CPU-bound job is just one infinitely long CPU burst. Each /O-bound job has a CPU burst of 1ms and then an I/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 (ie, the first time around, al s il run before the CPU ob. 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 lo-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 "lollCoCCololoCo" (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.1ms Question #1 [15pts). Consider the following execution: 10.4ms (10ms of actual job execution, .4ms of context-switch overhead). AAAAAoBBoCoDDDDDOAADDDDoAAAAAoBBB DDDDDOA AAoCoD Answer the following questions: [q1] Knowing that there is at least one CPU-bound job in this mix, could the time quantum be 6ms? why? [q2] Which job seems to have the longest I/O burst? Why? [q3] Knowing that one of this jobs is a text editor, which job do you think it is? Why? Question #2 [15 pts + 10 pts] Assume a job mix with 5 1/O-bound jobs and 1 fully CPU-bound job. The fully CPU-bound job is just one infinitely long CPU burst. Each /O-bound job has a CPU burst of 1ms and then an I/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 (ie, the first time around, al s il run before the CPU ob. 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 lo-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 "lollCoCCololoCo" (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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions