I am given a list of processes with their arrival time, CPU, time and Priority. The time quantum is given as 2 seconds. A lower priority number translates to a higher priority.

(process #, arrival time, CPU time, Priority)

-P0: 0, 8, 5

-P1: 2, 2, 4

-P2: 4, 1, 6

-P3: 6, 3, 3

So the priority ranks P3,P1,P0, P4.

would my scheduling look like this using the priority non preemptive scheduling algorithm:

P0 P0 P0 P0 P0 P0 P0 P0 P3 P3 P3 P1 P1 P2

I wasn't able to figure this question out on my homework and I wasn't given the solution either. I wasn't sure if the time quantum would affect my scheduling or if I even am understanding the priority non-preemptive scheduling algorithm either.


1 Answer 1


In non-preemptive scheduling the time quantum is not important for determining scheduling. The time quantum is only important when processes can preempt the CPU and 'cut' the line, such as in Round Robin scheduling. If you were given a time quantum for this problem I have a feeling it was stuck there to try to trip you up.

Your answer is correct though and it sounds like you understand the concept. Priority non-preemtptive scheduling can be visualized as a priority queue. If the queue is empty you can have the CPU, if not you get into line based on your priority and wait until whomever has the CPU releases it (on their own).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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