QIO
   HOME

TheInfoList



OR:

QIO (Queue I/O) is a term used in several computer
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s designed by the former
Digital Equipment Corporation Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president unt ...
( DEC) of
Maynard, Massachusetts Maynard is a town in Middlesex County, Massachusetts, United States. The town is located 22 miles west of Boston, in the MetroWest and Greater Boston region of Massachusetts and borders Acton, Concord, Stow and Sudbury. The town's population w ...
. I/O operations on these systems are initiated by issuing a QIO call to the
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learnin ...
. There are two types of QIO - Queue I/O, and Queue I/O and Wait. For QIO without wait, the call returns immediately. If the request is successfully enqueued, the actual operation occurs asynchronously. On completion, status is returned in the QIO status doubleword. The QIO request may also specify that completion set an
event flag {{notability, date=March 2019 An event flag is a process synchronization primitive in the OpenVMS operating system. It has two possible states, ''set'' or ''cleared''. The following basic primitive operations are provided: * Set event flag ($SETE ...
or issue an
Asynchronous System Trap Asynchronous System Trap (AST) refers to a mechanism used in several computer operating systems designed by the former Digital Equipment Corporation (DEC) of Maynard, Massachusetts. Mechanism Various events within these systems can be optionally ...
( AST). The call may also be issued as QIOW (Queue I/O and Wait for completion), allowing synchronous I/O. In this case, the wait-for-event-flag operation is combined so the call does not return until the I/O operation completes or fails. The following operating systems implement QIO(W): *
RSX-15 The PDP-15 was the fifth and last of the 18-bit minicomputers produced by Digital Equipment Corporation. The PDP-1 was first delivered in December 1959 and the first PDP-15 was delivered in February 1970. More than 400 of these successors to th ...
*
RSX-11 RSX-11 is a discontinued family of multi-user real-time operating systems for PDP-11 computers created by Digital Equipment Corporation. In widespread use through the late 1970s and early 1980s, RSX-11 was influential in the development of later ...
(including all of the variants) *
RSTS/E RSTS () is a multi-user time-sharing operating system developed by Digital Equipment Corporation (DEC, now part of Hewlett-Packard) for the PDP-11 series of 16-bit minicomputers. The first version of RSTS (RSTS-11, Version 1) was implemented in 1 ...
(synchronous only, emulated by the RSX run-time system) *
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
HP OpenVMS System Services Reference Manual
/ref>


QIO arguments in VMS

Under VMS, the arguments to the QIO call are: * The
event flag {{notability, date=March 2019 An event flag is a process synchronization primitive in the OpenVMS operating system. It has two possible states, ''set'' or ''cleared''. The following basic primitive operations are provided: * Set event flag ($SETE ...
to set when the operation completes. It isn't possible to ''not'' specify an event flag; flag 0 is valid. It is perfectly permissible to have multiple simultaneous operations that set the same event flag on completion. It is then up to the application to sort out any confusion this might cause, or just ignore that event flag. * The channel, a small integer previously associated with the device. At this level, all operations on disk files and directories (filename parsing, directory lookup, file opening/closing) are done by appropriate QIO requests. * The function code to be performed. 6 bits are assigned to the basic code (such as read, write), with a further 10 bits for "modifiers" whose meaning depend on the basic code. * The optional I/O status block (IOSB), which is cleared by the QIO call, and filled in on completion of the I/O operation. The first two bytes hold the completion status (success, end of file reached, timeout, I/O error, etc.), while the next two bytes normally return the number of bytes read or written in the operation. The meaning, if any, of the last four bytes is operation-dependent. * The optional AST routine to invoke when the operation completes. * An additional parameter (whose meaning is up to the caller) to be passed to the AST routine. * A partially standardized list of up to six parameters known as P1 through P6. The first two parameters typically specify the I/O buffer starting address (P1), and the I/O byte count (P2). The remaining parameters vary with the operation, and the particular device. For example, for a
computer terminal A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. The teletype was an example of an early-day hard-copy terminal and ...
, P3 might be the time to allow for the read to complete whereas, for a
disk drive Disk storage (also sometimes called drive storage) is a general category of storage mechanisms where data is recorded by various electronic, magnetic, optical, or mechanical changes to a surface layer of one or more rotating disks. A disk drive is ...
, it might be the starting block number of the transfer.


QIO completion

There are three different ways to sense when the queued I/O operation has completed: # When the event flag becomes set. # When the first two bytes of the IOSB become nonzero. # When the AST routine executes.


Unusual QIOs that require complex processing

Simple QIOs, such as read or write requests, are either serviced by the kernel itself or by device drivers. Certain more complicated requests, specifically those involving tape drives and file-level operations, were originally executed by an Ancillary Control Processor (ACP) (a special purpose task with its own address mapping). The
Files-11 Files-11 is the file system used by Digital Equipment Corporation OpenVMS operating system, and also (in a simpler form) by the older RSX-11. It is a hierarchical file system, with support for access control lists, record-oriented I/O, remote ...
ODS-1 file system on
RSX-11 RSX-11 is a discontinued family of multi-user real-time operating systems for PDP-11 computers created by Digital Equipment Corporation. In widespread use through the late 1970s and early 1980s, RSX-11 was influential in the development of later ...
was implemented by a subroutine library that communicated with a task named F11ACP using a special set of QIOs called the "ACP QIOs." The equivalent functionality for controlling magnetic tape devices was provided by a task named MTAACP. Originally, the Files-11 ODS-2 file system was provided by F11BACP on VMS, but the functionality of F11BACP was later incorporated into the VMS kernel to save the overhead of process context switches, and is now called an XQP (eXtended Qio Processor).


Probably the most complex single QIO request possible is the VMS terminal driver's call with the modifier; this QIO requires all six additional parameters: ; P1 : The address of the buffer into which the input characters are received ; P2 : The length of the buffer, limiting the maximum number of characters to read. If the buffer is filled, the read will complete successfully, even if the user does not type a line-terminator character. Zero is allowed, in which case the read will terminate successfully with zero characters read. ; P3 : The maximum number of seconds to wait for more input. This is only used if the modifier is present, and a value of zero means zero seconds: the read will terminate immediately, so the only possible input will be whatever had been "typed ahead" by the user. ; P4 : The address of the optional "terminator mask", specifying which ASCII characters terminate the read. If omitted, this defaults to the usual VMS line delimiters including carriage-return (but not line-feed). It is possible to specify a mask with ''no'' line terminators, in which case the read will only complete when the buffer is full, or the timeout has elapsed. ; P5 : The address of a prompt string to be displayed to the user before accepting input. The advantage of providing this prompt, instead of as a prior write operation, is automatic redisplay in any situation requiring a refresh of the input line while the read is in progress (such as after an operator message has been broadcast to the terminal, or the user hits CTRL/R to redisplay the line). ; P6 : The length of the prompt string. By appropriate choices of the above parameters, it is possible to do both terminal input and output with the one call, there is no need to use the regular call for terminal output at all.


References

{{reflist OpenVMS