13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Policies 45parameters; that is, they can be adjusted to tune the method. When the priority of a newprocess reaches the priority of an accepted process, that new process becomes accepted.If all accepted processes finish, the highest priority new process is accepted.Assume that there are no ready processes, when the first one, A, arrives. It haspriority 0 to begin with. Since there are no other accepted processes, A is acceptedimmediately. After a while another process, B, arrives. As long as b/a1,A will eventually finish,and then B can be accepted.Adjusting the relative values of a and b has a great influence on the behavior ofSRR. If b/a≥ 1, a new process is not accepted until all the accepted processes havefinished, so SRR becomes FCFS. If b/a= 0, all processes are accepted immediately, soSRR becomes RR. If 0 < b/a< 1, accepted processes are selfish, but not completely.To demonstrate how SRR schedules our running example, let us set a = 2 andb = 1. If a new process achieves the priority of the accepted processes at the end of aquantum, we place it on the ready list first and then preempt the running process. Figure2.12 shows the resulting schedule, including the priority of each process at the end ofeach quantum. The letter d indicates that the process is done.3C91101220BE04915AD0 5 10 15 20A B A B C B C B D E0 1 2 3 d0 2 3 4 5 6 7 8 9 d0 2 4 6 7 8 d0 2 3 4 5 6 d0 2 4 6 7 8 9 10Figure 2.12 SRR ScheduleThe statistics for our process set are as follows.dABCDE

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!