Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Process CPU Time Creation Time P1 20 0 P2 3 3 P3 2 5 Consider the set of processes in the table above. All times

Process CPU Time Creation Time
P1 20 0
P2 3 3
P3 2 5

Consider the set of processes in the table above.

All times are in milliseconds.

The CPU time is the total time required for the process (excluding any context switch time).

The creation time is the time when the process is created. So P1 is created when the problem begins and P3 is created 5 milliseconds later.

Assume each process performs no I/O, i.e., no process ever blocks.

QUESTION : When does each process finish if RR scheduling is used with q=1, if q=2, if q=3, if q=100?

First assume (unrealistically) that context switch time is zero.

Then assume it is 0.1.

If two processes have equal priority (in RR this means if they both enter the ready state at the same cycle), we give priority (in RR this means place first on the queue) to the process with the earliest creation time. If they also have the same creation time, then we give priority to the process with the lower number, i.e., P1 has priority over P2, which in turn has priority over P3. Since I use this rule for lab 2, I refer to it as the lab 2 tie-breaking rule.

1. Redo the previous homework for q=2 with the following changes. After process P1 runs for 3ms (milliseconds), it blocks for 2ms. P1 never blocks again. That is, P1 begins with a CPU burst of 3ms, then has an I/O burst of 2ms, and finally it has a CPU burst of 20-3 = 17ms. P2 never blocks. After P3 runs for 1 ms it blocks for 1ms. Assume the context switch time is zero. Remind me to answer this problem in class next lecture.

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions

Question

What five factors help determine if you have lost attention?

Answered: 1 week ago