This document provides an overview of the essential I/O data structures used in the VAX/VMS operating system to manage and control I/O operations between device drivers, the operating system, and user processes. It details the function, format, and interrelationships of various control blocks and tables that form the common I/O database.
Key data structures covered include:
- Channel Control Block (CCB): Links a process channel number to a device unit for I/O requests and provides access to mapping pointers for file-structured devices.
- I/O Request Packet (IRP): Describes individual I/O requests, holding both function-independent and device-dependent information, and is used to store completion status.
- Unit Control Block (UCB): The central data structure for each device unit, containing device characteristics, status, pointers to other blocks, device-dependent parameters, details of ongoing I/O, and the Fork Context Block for driver process context saving.
- Fork Queue: A doubly linked list of UCBs that holds pending fork processes, allowing drivers to save and restore context during interrupt handling or when waiting for resources.
- Function Decision Table (FDT): Specifies valid I/O function codes for a driver, indicates if buffered I/O is required, and contains dispatch pointers to routines for preprocessing I/O requests.
- Device Data Block (DDB): Stores information common to all devices of a particular type under a controller and provides pointers to UCBs and the Driver Dispatch Table.
- Channel Request Block (CRB): Manages controller arbitration for exclusive access, contains a busy flag, a queue of UCBs awaiting controller access, and a pointer to the Interrupt Dispatch Block. Its structure varies for UNIBUS and MASSBUS devices.
- Interrupt Dispatch Block (IDB): Facilitates dispatching interrupts from the controller to the appropriate driver service routine, holding UCB addresses for controlled units, pointers to hardware registers, and identifying the current owning UCB.
- Adapter Control Block (ADP): Used for UNIBUS devices to locate Control and Status Registers, allocate mapping registers and data paths, and contains interrupt servicing code.
- Driver Dispatch Table (DDT): Contains entry points for the device driver's routines (e.g., Start I/O, Cancel I/O, Unit Initialization), error logging information, and a pointer to the FDT.
The document illustrates how these structures are interconnected and traversed by system services like $ASSIGN (to initialize CCBs and locate devices), $QIO (for I/O request preprocessing), and during interrupt dispatching to locate the relevant device unit and restore driver context. It also highlights specific configurations for UNIBUS and MASSBUS devices. The overall purpose is to enable the VAX/VMS system to efficiently support and control diverse I/O operations.