16.2 rkstrategy (5389)

The strategy routine is called, e.g. from “swap” (5212), to handle both read and write requests.

5397:

The test and call on “mapalloc” here is a “no-op” except on the PDP11/70 system;

5399:

The code from here to line 5402 appears to be unnecessarily devious! See the discussion of “rkaddr” below. If the block number is too large, set the “B_ERROR” flag and report “completion”;

5407:

Link the buffer into a FIFO list for the controller. The list is singly linked, uses the “av_forw” pointer of the “buf” structures, and has head and tail pointers in “rktab”. Interrupts from disk devices may not be allowed after the first step;

5414:

If the RK controller is not currently active, wake it up via a call on “rkstart” (5440), which checks that there is something to do (5444), flags the controller as busy (5446) and calls “devstart” (5447), passing as parameters:

  • a pointer to the first enqueued buffer header;

  • the address of the RKDA disk address register. (The value passed is in effect 0177412. See lines 5363, 5382.);

  • a “disk address” computed by “rkaddr”;

  • zero (not really important in our discussion, and may be ignored).