I am asked to calculate the wait time for the processes below using the round robin sqeduling algorithm.
I am given a quantum of 8ms.

execution time(ms)
Process 1 = 13 priority 6
Process 2 = 20 priority 24
Process 3 = 26 priority 35
Process 4 = 51 priority 48
Process 5 = 176 priority 7

Please help!

How would YOU do it? Seems like its something like:

1) sort the processes into priority order
2) give them each min(8ms,execution time left) of time (and lowering their remaining time by that amount); all other active processes have to wait this amount of time!
3) as a process is completely satisfied it needs no more execution time, so it can either be removed from the list or else say that the remaining time is zero.

Seems simple!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.