Highest response ratio next
Highest response ratio next (HRRN) scheduling is a non-preemptive discipline, similar to shortest job next (SJN), in which the priority of each job is dependent on its estimated run time, and also the amount of time it has spent waiting. Jobs gain higher priority the longer they wait, which prevents indefinite postponement (process starvation). In fact, the jobs that have spent a long time waiting compete against those estimated to have short run times.
Developed by Brinch Hansen to correct certain weaknesses in Shortest job next including the difficulty in estimating run time.
HRRN 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 it's 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.