Specifications
Data Structures
1.19 Unit Control Block (UCB)
Table 1–22 Contents of Unit Control Block
Field Name Contents
UCB$L_FQFL* Fork queue forward link. The link points to the next entry in the fork queue.
EXE$IOFORK and system resource management routines write this field.
The queue contains addresses of UCBs that contain driver fork process
context of drivers waiting to continue I/O processing.
UCB$L_FQBL* Fork queue backward link. The link points to the previous entry in the fork
queue. EXE$IOFORK and system resource management routines write this
field.
UCB$W_SIZE* Size of UCB. The DPT of every driver must specify a value for this field.
The driver-loading procedure uses the value to allocate space for a UCB and
stores the value in each UCB created. Extra space beyond the standard
bytes in a UCB (UCB$K_LENGTH) is for device-specific data and temporary
storage.
UCB$B_TYPE* Type of data structure. The driver-loading procedure writes the constant
DYN$C_UCB into this field when the procedure creates the UCB.
UCB$B_FLCK Index of the fork lock that synchronizes access to this UCB at fork level. The
DPT of every driver must specify a value for this field. The driver-loading
procedure writes the value in the UCB when the procedure creates the UCB.
All devices that are attached to a single I/O adapter and actively compete for
shared adapter resources and/or a controller data channel must specify the
same value for this field.
When the operating system creates a driver fork process to service an I/O
request for a device, the fork process gains control at the IPL associated with
the fork lock, holding the fork lock itself in a multiprocessing environment.
When the driver creates a fork process after an interrupt, the operating
system inserts the fork block into a processor-specific fork queue based on
this fork IPL. A system fork dispatcher, executing at fork IPL, obtains the
fork lock (if necessary), dequeues the fork block, and restores control to the
suspended driver fork process.
This field is also known as UCB$B_FIPL. Drivers designed to execute
exclusively in a uniprocessing environment store the fork IPL associated
with the UCB in this field.
UCB$L_FPC Fork process driver PC address. When a system routine saves driver
fork context in order to suspend driver execution, the routine stores the
address of the next driver instruction to be executed in this field. A system
routine that reactivates a suspended driver transfers control to the saved PC
address.
System routines that suspend driver processing include EXE$IOFORK,
IOC$REQxCHANy, IOC$REQMAPREG, IOC$REQALTMAP,
IOC$REQDATAP, and IOC$WFIKPCH. Routines that reactivate suspended
drivers include IOC$RELCHAN, IOC$RELMAPREG, IOC$RELALTMAP,
IOC$RELDATAP, EXE$FORKDSPTH, and driver interrupt service routines.
When a driver interrupt service routine determines that a device is expecting
an interrupt, the routine restores control to the saved PC address in the
device’s UCB.
UCB$L_FR3 Value of R3 at the time that a system routine suspends a driver fork process.
The value of R3 is restored just before a suspended driver regains control.
UCB$L_FR4 Value of R4 at the time that a system routine suspends a driver fork process.
The value of R4 is restored just before a suspended driver regains control.
UCB$W_BUFQUO* Buffered-I/O quota if the UCB represents a mailbox.
UCB$W_INIQUO* Initial buffered-I/O quota if the UCB represents a mailbox.
(continued on next page)
1–87