HRRN Scheduling: Highest Response Ratio Next
Highest Response Ratio Next (HRRN) chooses the ready process with the largest response ratio when the CPU becomes free:
The rule
Response ratio = (waiting + burst) / burst = 1 + waiting / burst
Waiting increases a process's score. Dividing by burst also gives a given amount of waiting more weight for a shorter job. HRRN is nonpreemptive here: after selection, the process keeps the CPU until its burst finishes.
Worked example
This example uses a different workload from the first five articles.
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 6 |
| P2 | 1 | 4 |
| P3 | 5 | 1 |
One CPU · One burst per process · No I/O · Dispatch cost 0. Times are abstract units.
P1 runs until 6. At that decision, P2 has waited 5 with service 4: ratio (5 + 4) / 4 ≈ 2.25; P3 has waited 1 with service 1: ratio (1 + 1) / 1 ≈ 2.
P2 wins despite its longer burst. It runs until 10; P3 then finishes at 11. A waiting job's rising ratio does not interrupt the current nonpreemptive selection.
| Candidate | Waiting | Burst | Response ratio |
|---|---|---|---|
| P2 | 5 | 4 | (5 + 4) / 4 ≈ 2.25 |
| P3 | 1 | 1 | (1 + 1) / 1 ≈ 2 |
Candidate scores at t = 6 · baseline 0
- P1: [0, 6)
- P2: [6, 10)
- P3: [10, 11)
Calculate the result
| Process | Completion | Waiting | Turnaround | Response |
|---|---|---|---|---|
| P1 | 6 | 0 | 6 | 0 |
| P2 | 10 | 5 | 9 | 5 |
| P3 | 11 | 5 | 6 | 5 |
P2: turnaround = 10 − 1 = 9. Waiting = 9 − 4 = 5. First response = 6 − 1 = 5.
Waiting and first response coincide for a nonpreempted process; interrupted work can wait again after its first turn.
Mean waiting = (0 + 5 + 5) / 3 ≈ 3.333 units. Mean response ≈ 3.333 units.
Response ratio is not response time
The response ratio is a unitless priority score used to choose a process. Response time is the delay until that process first receives CPU service, measured in time units. A priority ratio is not the number of time units the process has waited.
HRRN provides a way for waiting work to gain priority, while still requiring known or estimated burst lengths. It should not be described as a universal guarantee of bounded waiting for every possible incoming workload.