0
$\begingroup$

Consider the following processes :

enter image description here

1) My First Question is if we need to schedule them using preemptive priority scheduling with Round-Robin for equal processes priorities with a quantum of 3. Here is my answer to this problem :

enter image description here

Sorry about that bad drawing. My problem here is at time 13. At this time we have two processes of equal priority ( p1 and p3 ) that we need to schedule them using RR with a quantum of 3 . My question is what process we will start scheduling it here ? I have started with p1 as it was already being executed by the CPU . Also is the rest of the answer is right ?

2) Now for the second question. Let's consider that We need to schedule the same process with a round-robin with a quantum of 4 . I have used this website to check my answer http://cpuburst.com/ and here its answer : enter image description here

According to this answer, at time 20 p4 should be executed, but according to my answer p1 is the process that should be executed ?? And due to this difference, the rest of the answer is different to mine.

$\endgroup$
0
$\begingroup$

You had to make assumptions. Your problem is that “priority scheduling with round robin for equal priority” is not enough to specify exactly what happens.

Your scheduler will consider a change in the schedule when the running process finishes, when a new process is started with priority same or higher than the currently running process, or if the quantum is elapsed - but it’s not obvious if this is every three seconds, or three seconds after the last change in schedule. And exactly what “round robin” would pick isn’t clear.

You’d need the exact details of the scheduling algorithm.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Ok many thanks , but what about the second question , at time =20 , p1 is the first process in the ready queue and therefore it is the one that should start executing ? $\endgroup$ – John adams Apr 11 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.