DYNAMIC STORAGE MANAGEMENT: ACTIVE DISKS AND FILES CMS disks and files contained on disk are physically mapped using the
data blocks described above: for disks, the QMSK, QQMSK, and the MFD; for files, the FST, chain links, and 800-byte file records. In storage,
all of this data is accessed by means of two DSECTs whose addresses are
defined in the DSECT NUCON, ADTSECT and AFTSECT. The ADTSECT DSECT maps information in the active disk table (ADT). This information includes data contained in the MFD, FST blocks; the QKSK, and QQMSK. The DSECT comprises of ten "slots," each representing one virtual ! slot contains siqnificant information about the
disk such as a pointer to the MFD for the disk, a pointer to the first FST block and pointers to the QMSK and QQMSK, if the disk is a R/i disk.
Also contained in ADTSECT is information such as the number of cylinders
on the disk, the number cf records on the disk.
Each open file is represented in storage by an active file table (AFT).
The AFT (defined by the AFTSECT DSECT) contains data found on disk in FSTs, chain links, and data records. Also contained in the AFT is such
information as the address of the first chain link for the file, the
current chain link for the file, the address of the current data block,
the fileid information for the file. Figure 1 shows the relationship
between the AFT and other CMS data blocks. CMS ROUTINES USED TO ACCESS THE FILE SYSTEM DMSACC the control routine used to access a virtual disk. In
conjunction with DMSACM and DMSACF, DMSACC builds, in virtual storage,
the tables CMS requires for processing files contained on the disk. The
list below shows the logical flow of the main function of DKSACC. ACCESS A VIRTUAL DISK: DKSACC Scans the command line to determine which disk is specified. DMSLAD: Looks up the address of the ADT for the disk specified on the coHaiid line. DMSACC: Determines whether an extension to a disk has been specified on th;-Command line and ensures that it is correctly specified. In the case where an extension has been specified, calls DKSLAD to ensure that the extension disk exists,. DMSLAD: Ensures that the specified disk is not already accessed as a R/W dIsk:-- CMS Method of Operation and Progra. Organization 2-93
DMSFNS: In the case where the specified disk is replacing a currently accessed disk, closes any open files belonging to the duplicate disk. Verifies the parameters remaining on the command line. DMSALU: Releases any free storage belonging to the duplicate disk via a call-to DMSFRE. Also, clears appropriate entries in the ADT for use by the new disk. (Called as the first instruction by DftSACF) Reads, fro. the
Master File Directory, QMSK, and the QQftSK for the specified disk; also, DMSACM updates the ADT for the specified disk using information from the
MFD. DMSACF: Reads into storage all the FST blocks associated with the specIfied disk. DMSACC: Handles error processing or processing required to return control to DMSINT. Handling I/O Operations CMS input/output operations for disk, tape, and unit record devices are
always synchronous. Disk and tape I/O is initiated via a privileged
instruction, DIAGNOSE, whose function code requests CP to perfor.
necessary error recovery. Control is not returned to CBS until the
operation is complete, except for tape rewind or rewind and unload
operations, which return control immediately after the operation is
started. No interruption is ever received as the result of DIAGNOSE I/O. The CSW is stored only in the event of an error.
Input/output operations to a card reader, card punch, or printer are
initiated via a normal START I/O instruction. After starting the
operation, CMS enters the wait state until a device end interruption is
received frem the started device. Because the I/O is spooled by CP, CBS does not handle any exceptional conditions other than not ready,
end-of-file, or forms overflow. eMS input/output operations to the terminal may be either synchronous
or asynchronous. Output to the terminal is always asynchronous, but a
program may wait for all terminal input/output operations to complete by calling the console wait routine. Input from the terminal is usually
synchronous but a user may cause CMS to issue a read by pressing the
attention key. A program may also asynchronously stack data to be read by calling the console attention routine. UNIT RECORD I/O PROCESSING Seven routines handle I/O processing for CftS: DMSRDC, DftSPUR, and DBSPRT handle the READCARD, PUNCH, and PRINT commands and pass control to te
actual I/O processors, DMSCIO (for READCARD and PURCH) or DftSPIO (for PRINT). DMSCIO and DMSPIO issue the 510 instructions that cause I/O to
take place. Two other routines, DftSIOi and DMSITI, handle
synchronization processing for I/O operations. Figure 18 shows the
overall flow of control for I/O operations.
2-94 IBM VM/370 System Logic and Program Determination--Voluae 2
Previous Page Next Page