Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Help is greatly appreciated! Exercise #2 [35 pts] Consider an OS that uses an MLFQ Scheme with 3 Round-Robin Queues The high-priority queue has a

Help is greatly appreciated!

image text in transcribed

Exercise #2 [35 pts] Consider an OS that uses an MLFQ Scheme with 3 Round-Robin Queues The high-priority queue has a time quantum of 5ms; The mid-priority queue has a time quantum of 10ms The low-priority queue has a time quantum of 20ms. Consider a job mix in which all jobs go through sequences of CPU bursts and /O bursts, and that all /O bursts last 1ms (somehow, all jobs place similar, short I/O requests) We assume that the context-switch overhead is zero We can now describe a job by a single number: a CPU burst duration. For instance, a job with CPU burst duration of 10ms is simply: compute for 10ms, I/O for 1ms, compute for 10ms, VO for 1ms,... ad infinitum. we thus describe a ob mix as a list of X y notations, which means job X with CPU burst duration y For instance A 5 B-9, 3 D 1 describes a job mix with 4 jobs such that: Job A has 5ms CPU bursts Job B has 9ms CPU bursts; Job C has 5ms CPU bursts Job D has 1ms CPU bursts. Question #1 [20 pts): Consider the following job mix: "A-6, B-4, C-8, D-40, E-20". Answer the following questions: [01] Assuming that the scheduler does not implement any priority boosting, for each job say in which queue it eventually ends up (forever) [q2] Initially, as you know, all jobs are in the top-priority queue. Say that they are in the order A, B, C, D,E (i.e, A will be scheduled first, then B, etc.). Assuming A begins its CPU burst at time 0, at what time is D placed in the mid-priority queue? Don't just give a single number without any explanation. Explain your reasoning in English, and/or give the time as a sum of terms, and/or give an execution sequence as in Exercise #1 (eg.."AABCDBBABDBAEEEE" or with spaces for better readability AA B C D BBABD B A EEEE"). Question #2 [15 pts] Consider the following job mix: "A-4, B-o". Answer the following questions: [q1] Assume that the scheduler does not implement any priority boosting, and ignore the initial phase in the schedule during which jobs may be demoted to lower- priority queues(Le assume that obs have already been demoted write the execution sequence on the CP as in Exercise #1 e.g. "A ABCDE A BAEE o it spaces for better readability "AA B C DBBABDB A EEEE). There is a simple repeating pattern at some point. Your answer should show this pattern twice and then just [q2] In the long run, is the CPU running ob B more than 25% of the time? Explain by referring to the answer to the previous question. [q3] Assume that the scheduler implements priority boosting every 14ms starting at time 15ms (i.e., there is a priority boost to the top queue at times 15, 29,43,67, etc.) Write the execution sequence in this case. There is again a simple repeating pattern. Your answer should show this pattern three time and then just "... Exercise #2 [35 pts] Consider an OS that uses an MLFQ Scheme with 3 Round-Robin Queues The high-priority queue has a time quantum of 5ms; The mid-priority queue has a time quantum of 10ms The low-priority queue has a time quantum of 20ms. Consider a job mix in which all jobs go through sequences of CPU bursts and /O bursts, and that all /O bursts last 1ms (somehow, all jobs place similar, short I/O requests) We assume that the context-switch overhead is zero We can now describe a job by a single number: a CPU burst duration. For instance, a job with CPU burst duration of 10ms is simply: compute for 10ms, I/O for 1ms, compute for 10ms, VO for 1ms,... ad infinitum. we thus describe a ob mix as a list of X y notations, which means job X with CPU burst duration y For instance A 5 B-9, 3 D 1 describes a job mix with 4 jobs such that: Job A has 5ms CPU bursts Job B has 9ms CPU bursts; Job C has 5ms CPU bursts Job D has 1ms CPU bursts. Question #1 [20 pts): Consider the following job mix: "A-6, B-4, C-8, D-40, E-20". Answer the following questions: [01] Assuming that the scheduler does not implement any priority boosting, for each job say in which queue it eventually ends up (forever) [q2] Initially, as you know, all jobs are in the top-priority queue. Say that they are in the order A, B, C, D,E (i.e, A will be scheduled first, then B, etc.). Assuming A begins its CPU burst at time 0, at what time is D placed in the mid-priority queue? Don't just give a single number without any explanation. Explain your reasoning in English, and/or give the time as a sum of terms, and/or give an execution sequence as in Exercise #1 (eg.."AABCDBBABDBAEEEE" or with spaces for better readability AA B C D BBABD B A EEEE"). Question #2 [15 pts] Consider the following job mix: "A-4, B-o". Answer the following questions: [q1] Assume that the scheduler does not implement any priority boosting, and ignore the initial phase in the schedule during which jobs may be demoted to lower- priority queues(Le assume that obs have already been demoted write the execution sequence on the CP as in Exercise #1 e.g. "A ABCDE A BAEE o it spaces for better readability "AA B C DBBABDB A EEEE). There is a simple repeating pattern at some point. Your answer should show this pattern twice and then just [q2] In the long run, is the CPU running ob B more than 25% of the time? Explain by referring to the answer to the previous question. [q3] Assume that the scheduler implements priority boosting every 14ms starting at time 15ms (i.e., there is a priority boost to the top queue at times 15, 29,43,67, etc.) Write the execution sequence in this case. There is again a simple repeating pattern. Your answer should show this pattern three time and then just

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions