Highest Response Ratio Next
   HOME

TheInfoList



OR:

Highest response ratio next (HRRN)
scheduling A schedule or a timetable, as a basic time-management tool, consists of a list of times at which possible tasks, events, or actions are intended to take place, or of a sequence of events in the chronological order in which such things are ...
is a non-preemptive discipline. It was developed by
Brinch Hansen Per Brinch Hansen (13 November 1938 – 31 July 2007) was a Danish-American computer scientist known for his work in operating systems, concurrent programming and parallel and distributed computing. Biography Early life and education Per B ...
as modification of shortest job next or shortest job first (SJN or SJF) to mitigate the problem of
process starvation A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management *Business process, activities that produce a specific se ...
. In HRRN, the next job is not that with the shortest estimated run time, but that with the highest response ratio defined as response\ ratio = \frac = 1 + \frac This means, the jobs that have spent a long time waiting compete against those estimated to have short run times. As you can see in the above equation of response ratio, if the waiting time of a process increases, its response ratio increases making the long-awaited process to execute next. So, this algorithm solves the starvation problem that exists in SJN scheduling algorithm.


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

*
Shortest remaining time Shortest remaining time, also known as shortest remaining time first (SRTF), is a scheduling method that is a preemptive version of shortest job next scheduling. In this scheduling algorithm, the process with the smallest amount of time remainin ...


References

* William Stallings: ''Operating systems: internals and design principles''. 4th ed., Prentice-Hall, 2001, . Processor scheduling algorithms {{operating-system-stub