Specifications
Data Structures
1.3 Channel Control Block (CCB)
1.3 Channel Control Block (CCB)
When a process assigns an I/O channel to a device unit with the $ASSIGN
system service, EXE$ASSIGN locates a free block among the preallocated
channel control blocks (CCBs) of the process. EXE$ASSIGN then writes into the
CCB a description of the device attached to the CCB’s channel.
The channel control block is the only data structure described in this chapter that
exists in the control (P1) region of a process address space. It is illustrated in
Figure 1–4 and described in Table 1–3.
Figure 1–4 Channel Control Block (CCB)
CCB$L_UCB* 0
CCB$L_WIND* 4
CCB$B_STS*CCB$B_AMOD*CCB$W_IOC* 8
CCB$L_DIRP* 12
*A read-only field
Table 1–3 Contents of Channel Control Block
Field Name Contents
CCB$L_UCB* Address of UCB of assigned device unit. EXE$ASSIGN writes a value
into this field. EXE$QIO reads this field to determine that the I/O request
specifies a process I/O channel assigned to a device and to obtain the device’s
UCB address.
CCB$L_WIND* Address of window control block (WCB) for file-structured device assignment.
This field is written by an ACP or XQP and read by EXE$QIO.
A file-structured device’s XQP or ACP creates a WCB when a process
accesses a file on a device assigned to a process I/O channel. The WCB
maps the virtual block numbers of the file to a series of physical locations on
the device.
CCB$B_STS* Channel status.
CCB$B_AMOD* Access mode plus 1 of the channel. EXE$ASSIGN writes the access mode
value into this field.
CCB$W_IOC* Number of outstanding I/O requests on channel. EXE$QIO increases this
field when it begins to process an I/O request that specifies the channel.
During I/O postprocessing, the special kernel-mode AST routine decrements
this field. Some FDT routines and EXE$DASSGN read this field.
CCB$L_DIRP* Address of IRP for requested deaccess. A number of outstanding I/O
requests can be pending on the same process I/O channel at one time. If
the process that owns the channel issues an I/O request to deaccess the
device, EXE$QIO holds the deaccess request until all other outstanding I/O
requests are processed.
1–12