Guardian Programmer's Guide

Table Of Contents
Guardian Programmer’s Guide 421922-014
9 - 1
9
Communicating With Devices
In addition to introducing some of the major features of the I/O subsystem, this section
discusses mechanisms that your program can use to communicate with devices in
general. These include:
Device access through device names and logical device numbers
Control through SETMODE, CONTROL, and SETPARAM procedure calls
Access to device-specific status information such as device type
The information presented here provides an introduction to subsequent sections that
discuss communication with specific device types: Section 10, Communicating With
Terminal s, provides details on communicating with terminals; Section 11,
Communicating With Printers, discusses access to printers; and Section 12,
Communicating With Magnetic Tape, provides information about communicating with
magnetic tape. Refer to the data communications manuals for information regarding
communication with other types of communications lines.
Overview of I/O Subsystem
Before this section discusses how to access and control devices, it is necessary for
you to understand some basic features of the I/O subsystem.
When your application program accesses a device, it does so with a call to the file
system. The file system sends a message to the I/O process that processes all
requests for the specified device.
Usually, two independent paths exist to each device to ensure that the device is always
accessible. Therefore, if any failure occurs within the system, at least one path to the
device is still operable.
Hardware and software work together to provide device fault tolerance in a way that is
invisible to the application process. Figure
9-1 shows the architectural components of
the system that support device fault tolerance.
The I/O process (IOP) contains the code that a
ctually performs the operation on the
device. Note that two IOPs usually exist for the device: a primary IOP and a backup
IOP. Although only the primary IOP is active at any time, the backup is ready to
become the primary if for any reason the primary is unable to continue processing.
For devices that are configured for continuous availability, redundant hardware ensures
that a hardware path is always available to the device. Checkpointing between the
primary IOP and backup IOP makes sure that a backup IOP is always ready to
become the primary should the need arise.