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 ...
is a non-preemptive discipline. It was developed by
Brinch Hansen Per Brinch Hansen (13 November 1938 – 31 July 2007) was a Denmark, Danish-United States, American computer scientist known for his work in operating systems, Concurrent computing, concurrent Computer programming, programming and Parallel comput ...
as modification of
shortest job next Shortest job next (SJN), also known as shortest job first (SJF) or shortest process next (SPN), is a scheduling policy that selects for execution the waiting process with the smallest execution time. SJN is a non- preemptive algorithm. Shortest ...
or shortest job first (SJN or SJF) to mitigate the problem of process starvation. 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 remaini ...


References

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