I/O Management

With the basic Dispatcher functions up and running we can now turn to I/O management.  Our I/O management code will consist of several components.  We will need a control block to keep the status of each device.  For this we will use a Unit Control Block (UCB).  Each device we manage will have a UCB in our UCB Table.  The UCB’s are chained together and must be defined in sequence based on the Device Address (CUA).

We will then need a component to schedule and queue I/O requests.  If a device is available the I/O request can immediately be issued.  If the device is busy processing another request the new one will be placed in a queue anchored off the UCB.  An I/O request will be represented by a control block, the I/O Request Block (IORB).

When an I/O request is completed by the device an interrupt will be generated.  We will then need an I/O Interrupt processing routine to signal the originator of the request and start the next queued request for the device.

We will also build a SVC interface to the I/O scheduler.  The SVC will take a control block, the I/O Block (IOB) and will build the IORB and then call the I/O Scheduler.  It will also provide for posting an ECB when the I/O is complete.

Finally we will begin work on a 3270 Console that will use the SVC I/O interface.

In building and testing the I/O code I found and corrected a few bugs in the previous code.  I had to fix the Nucleus Loader because when the Nucleus Load Module required loading two blocks of data the second was being loaded at the wrong location in memory.

I also discovered a bug in the Wait SVC processing.  If the Wait SVC was called and the ECB was already posted the SVC was exiting to the Dispatcher instead of exiting through the Exit Routine.  This resulted in leaving the RB associated with the Wait SVC on the TCB RB Chain.  The fix was to use the Exit Routine which deletes the RB.

[Next – Unit Control Block – @UCB]

Leave a Reply

Your email address will not be published. Required fields are marked *