Skip to article
ContentsHRRN
Learn/Chapter 06 of 08

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.

Example inputs
ProcessArrivalBurst
P106
P214
P351
Scroll horizontally for all columns

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.

Eligible choices at t = 6
CandidateWaitingBurstResponse ratio
P254(5 + 4) / 4 ≈ 2.25
P311(1 + 1) / 1 ≈ 2
Scroll horizontally for all columns
Worked trace HRRN

Candidate scores at t = 6 · baseline 0

P22.25
P32
CPU execution: HRRNP1 runs [0, 6); P2 runs [6, 10); P3 runs [10, 11). Segment widths show elapsed time. Diamond markers show arrivals. ARRIVALSP1P2P3P1P2P3061011Time → Intervals are half-open [start, end). No dispatch overhead.CPU execution: HRRNA compact proportional timeline. Diamond markers show arrivals; the complete exact interval sequence follows in text.ARRIVALSP1P2P3P1P2P3061011Time →
Scroll horizontally for all intervals
Complete CPU trace · [start, end)
  1. P1: [0, 6)
  2. P2: [6, 10)
  3. P3: [10, 11)
Accumulated waiting lets the longer eligible job outweigh the shorter job.
Open this example in the simulator

Calculate the result

Per-process results
ProcessCompletionWaitingTurnaroundResponse
P16060
P210595
P311565
Scroll horizontally for all columns

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.