8.13 setrun (2134)

2140:

The process status is set to “SRUN”. The process will now be considered by “swtch” and “sched” as a candidate for execution again;

2141:

If the aroused process is more important (lower priority!) than the current process, the rescheduling flag, “runrun” is set for later reference;

2143:

If “sched” is sleeping, waiting for a process to “swap in”, and if the newly aroused process is on disk, wake up “sched”.

Since it turns out that “sched” is the only procedure which calls sleep with “chan” equal to “&runout”, line 2145 could be replaced by the recursive call

   setrun(&proc[0]);

or better still, by just

   rp = &proc[0];
   goto sr;

where “sr” is a label to be inserted at the beginning of line 2139.