Highest response ratio next

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by SebastianHelm (talk | contribs) at 10:40, 15 January 2018 (replacing "priority", for which we have no clear definition (and which, confusingly, is commonly understood such that priority 1 is highest) with "response ratio". Estimating run time is needed here, too.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Highest response ratio next (HRRN) scheduling is a non-preemptive discipline. It was developed by Brinch Hansen as modification of shortest job next (SJN) to mitigate the problem of process starvation. In HRRN, the next job is not that with the shorted estimated run time, but that with the highest response ratio defined as

This means, the jobs that have spent a long time waiting compete against those estimated to have short run times.

Algorithm

given a Linked list Q, iterate through Q to find the highest ratio by comparing each ratio within the queue. Once a ratio of element N is greater than the element M with the highest ratio replace element M with element N as the highest ratio element in the list. Once the end of the list is reached dequeue the highest ratio element. If the element is at the start of the list, dequeue it and set the list to its next element, returning the element. Otherwise N's neighbours are reassigned to identify each other as their next and previous neighbour, returning the result of N.

See also

References

  • William Stallings: Operating systems: internals and design principles. 4th ed., Prentice-Hall, 2001, ISBN 0-13-031999-6.