• Aucun résultat trouvé

ARBITRARY DEVICE HANDLER

Dans le document SYSTEM OPERATING (Page 181-186)

UNIVAC 1100 SERIES SYSTEMS

6. INPUT/OUTPUT DEVICE HANDLERS

6.9. ARBITRARY DEVICE HANDLER

The arbitrary device handler (ADH) allows the user to directly control the I/O functions to a device on an I/O channel. This capability provides support for special devices where standard handlers are not provided and for special operations on devices where standard handlers are provided.

The ADH is entered through either the 10ARB$ or IOAXI$ requests described in 6.9.2 and 6.9.3, respectively.

6.9.1. ADH I/O PACKET

The format for the arbitrary device I/O packet as illustrated in Figure 6-2.

4144 Rev. 2 UNIVAC 1100 SERIES SYSTEMS 6-28

UP-NUMBER PAGE REVISION PAGE

S1 S2 S3 H2

Word 0

filename

2 0 int-act-id interrupt-activity-addr

3 monitor-interrupt-activity-addr

4 status time-out time-ind function-string

5 initial-access-word-1

6 final-word-count-1 rel-time-'

7

8

9 initial-access-word-n

10 final-word-count-n rel-time-n

Figure 6-2. Arbitrary Device Handler Packet

Word 0 and 1

The internal filename used in all references to the file. This name is either the same name as the external filename specified in an @ASG control statement or is equated to an external filename by a @USE control statement.

Word 2 int-act-id

interrupt-activity-addr Word 3

Monitor-interrupt-starting-addr

Numeric identity (1-35) given to the external interrupt activity (lOARB$ only). This field can be left as zero as for the magnetic tape or drum handler packet if no synchronization is required with this activity. For entrance at IOAXI$, the interrupt activity has the same id as the original activity.

Address at which control is to be given upon occurrence of an external interrupt.

The address at which the interrupt activity is given control if the function string indicates a monitor interrupt is to be returned to the user, and the interrupt which indicates completion of the operation is a monitor interrupt.

I

\.

4144 Rev. 2

UP-NUMBER

Word 4 status time-out

time-ind

function-string

Words 5, 7, ... ,n-'

UNIVAC 1100 SERIES SYSTEMS 6-29

PAGE REVISION PAGE

Status code indicating the disposition of the request.

The number of six-second intervals the subsystem should be timed before the lack of a monitor or external interrupt is to be considered an error. The value 1 corresponds to 6 seconds, 2 to 12 seconds, and so forth.

Indicates the disposition of a timeout condition. If this field is not zero and an operation is left outstanding on a channel for a time in excess of the time-out value, a unique status code is returned to the packet. If the field is zero, a timeout message is displayed on the operator's console, and the response is returned.

Consists of a group of three-bit bytes (octal digit string) interpreted from left to right (bits 17-15 comprise the first byte). The assigned codes are:

o -

End of string

1 - Initiate function mode without monitor (LFC) 2 - Initiate function mode with monitor (LFCM) 3 - Initiate output mode without monitor (LaC) 4 - Initiate output mode with monitor (LOCM) 5 - Initiate input mode without monitor (LlC) 6 - Initiate input mode with monitor (LlCM)

The initial access words to be used to control the channel.

Words 6, 8, ... ,n final-word-count-n rel-time-n

Final word count as contained in access control register.

Relative time between execution of the corresponding operation in the string and the execution of the next operation or the occurrence of an interrupt. The time is given in 200·microsecond increments.

Starting at the left of the function-string, the operations represented by the code are carried out as directed. As the string is interpreted, succeeding pairs of access words are referenced. The final word count of the preceding operation is updated and the initial access word for the current operation is loaded. At most, six modes can be specified in the initiation string. As a practical limit, the combined length of all external function buffers is set at 9; exceeding this count is considered a program logic error and causes reference to the error mode return point. As an example of string interpretation. If an input operation is to be performed with termination by an external interrupt, the initiation string could be 51 OOOOa with two sets of access words. The first operation by the ADH is to load the input channel assigned to the filename specified in the packet using the access word in word 5. This is followed by a Load Function In Channel instruction (LFC) using the access word in word 7 to locate the function word. Upon occurrence of an external interrupt, the final access word count and the relative time are stored in word 6, and the final values for LFC are placed in word 8.

4144 Rev. 2

UP-NUMBER

UNIVAC 1100 SERIES SYSTEMS 6-30

PA GE RE VISION PA G E

The user can specify instructions in any desired order to perform a particular I/O operation. When a monitor instruction is encountered, the ADH halts further interpretation of the string until the particular monitor occurs. The user program must make certain that the proper instructions are monitored to ensure that the respective access words do not get overlaid; that is, if two successive operations initiate output transfer, the first one should be with monitor unless the time between I/O instruction executions allows for transfer of all words of the first output buffer. To determine whether or not an access word has sufficient time to count down between initiation of operations by the ADH and hence possibly allow operating at times without a monitor, the minimum time between execution of the I/O instructions by the ADH is at least 1 D microseconds (this varies upward, depending upon operation, overlapping data transfers, and so forth). For such sequences as a function transfer of a single-word external function (EF) buffer followed by an output transfer, this is sufficient time for the function transfer to be completed before output transfer is initiated without the necessity of monitoring the function transfer.

The appearance of monitored modes does not necessarily indicate the need for a monitor completion activity (specified in word 3), as the ADH interprets intermediate monitor modes. A monitor activity is required if either:

• the last mode in a string is with monitor; or

II the last mode is not monitored, and no external interrrupt is expected to signal conclusion of the mode established as a result of the final mode.

If any monitored modes precede the final mode, whether a wait for external interrupt should be done after the final I/O instruction is executed is determined by a nonzero value in H2 of word 3. For example, an input drum operation is normally terminated without interrupt; hence, the sequence LFC, LlCM, LFC is used, and a monitor interrupt activity is specified and executed without waiting after sending out the second function following the input monitor interrupt whereas an output drum operation is normally terminated with interrupt; hence, the sequence LFC, LOCM, LFC may be used without a monitor interrupt activity, in which case a wait for external interrupt is done after sending out the second function.

Regardless of the manner in which the ADH gives control to the interrupt activity, in all cases, the input and output active states are cleared on the particular channel by execution of the Disconnect Input In Channel (DIC) and Disconnect Output In Channel (DOC) instructions before control is given to the interrupt activity.

When a function mode is called, the ADH inserts the proper unit designator and adds the proper base address to the relative address of the function word. At that time, if the channel contains equipment shared by other assignments, it may be necessary to perform certain error checks to prevent leaving the channel in an indeterminate state and to prevent intrusion upon other assignment privacy. Nonstandard special I/O devices are assigned by channel, and the ADH makes no modifications to the function words for these devices.

The function buffer for magnetic tape or mass storage channels is limited to a word count of one word, except for search functions, in which case a second word, the identifier, and for UNISERVO "I-A tape units, a third word, the mask, are allowed. For other than these cases, in a multiple-word EF buffer, each word is modified by the unit designation and subjected to the particular tests based on equipment type.

Word 2 and word 3 of the packet may be used to specify interrupt activities, one of which is executed when the corresponding interrupt occurs. Word 2 specifies the activity to be executed in case of an EI. The lower half of the word gives the activity starting address, and S3 is set to the activity identity if synchronization is necessary. The register save and priority are assumed to be X 11 through A5, R 1 through R3, and top priority, respectively. An EI activity must always be specified regardless of whether a monitor interrupt is to be used. The monitor activity is defined in words in the same format as the EI activity. If both a monitor and an EI occur, the EI activity is given control, and occurrence of the monitor interrupt can be determined by examining the access word. When control is given to the interrupt activity, register AD is loaded with the packet address, and, for the EI activity, register A 1 contains the EI status word.

Upon completion of an I/O operation by the ADH, a status code is stored in S1 of word 4 of the request packet denoting the conditions of the completion.

6.9.2. INITIATE ADH AND RETURN CONTROL IMMEDIATELY (IOARB$) Purpose:

Initiates an arbitrary device I/O operation with control returned, in line, as soon as the request is either listed or the operations have been initiated. An interrupt activity is initiated when the request is completed.

4144 Rev. 2

UP-NUMBER

Format:

L AO,pktaddr

ER 10ARB$

Parameters:

pktaddr

UNIVAC 1100 SERIES SYSTEMS

Address of device I/O Packet (see Figure 6-2).

6.9.3. INITIATE ADH, EXIT AT INTERRUPT (lOAXI$) Purpose:

PA GE RE VISION

6-31

PAGE

Initiates an arbitrary device I/O operation with the referenced activity simulating an exit function, and controls the return to the program at the appropriate interrupt activity specified in the request packet.

Format:

L AO,pktaddr

ER 10AXI$

Parameters:

pktaddr Address of device I/O packet (see Figure 6-2).

Description:

The activity performing the 10AXI$ request does not actually exit, but saving and restoring registers is eliminated (except for register AO), and the register set is reduced to the minor set only. The' continuation of the 10AXI$ activity at the interrupt point is with the same activity-id; hence, the value in the int-act-id field is ignored for the 10AXI$ request.

6.9.4. FREE FORMAT DISC HANDLER

This handler is designed to format, read, and write disc packs in other than the standard 1100 series executive formats. It is an adaptation of the ADH to control multi-interrupting, byte-oriented, command chain disc subsystems with the 1100 series executive format handler operating on other drives of the same subsystem.

The I/O packet format for free format disc is as described in 6.9.1 and illustrated in Figure 6-2 with the following exceptions.

Word 3

The monitor-interrupt-activity-addr field is unused. No monitor operations to free format disc are permitted. When the packet is checked for the function string (word 4), any monitor operation that is encountered causes reference to the error mode return point.

Word 4

The time-out field specifying the number of six-second intervals is unused. All free format disc I/O operations are confined to one six-second time interval by the executive system.

The free format device I/O is limited to one external function (EF) access control word per packet request where the function access word may be up to eleven words in length. The EF access words may contain the command parameters as well as the command string. For example an operation to do a read may be as follows:

4144 Rev. 2 UNIVAC 1100 SE RI ES SYSTEMS 6-32

UP-NUMBER PAGE REVISION PAGE

Word 0 Set file mask command Seek command 2 Search command

3 Read command

4 Jump command

5 Set file mask command 6-7 Seek parameters 8-9 Search parameters

When one function operation has been found and a second fu nction operation is indicated, the program is considered in logic error and causes a reference to the error mode return point.

Once the mode string has been accepted and the I/O is to be started at initiation of the EF, a delay occurs if the next operation is to be an output operation. This delay is done to ensure that the EF chain and parameters access word has been sent before the output access control word is issued. Otherwise, the output access control word would overlay the EF access control word. If an input operation follows the issuance of the function chain, no delay occurs in opening input (L1C).

Once the I/O access control word has been initiated by either a Load Input Channel (L1C) or Load Output Channel (LOC), another I/O access control word (ACW) may follow until the limit of six modes is reached. This method is not advised because no delays are done after the ACW has been initiated, and thus the new ACW would overlay the previous ACW before it was completed. As a practical limit, it is recommended that a single I/O operation following the EF be used per packet request.

The EF command chain is checked to ensure that the M field (multiple function string) of the MSA/disc command is not set.

If in the command chain the M field is found to be set, a program logic error is assumed and causes a reference to the error mode return point.

The device address field of the MSA/disc command is cleared by the executive and the file associated device address is inserted.

The external status received by the executive is returned at the normal mode return point in register A 1 where the external status is found in H2 of register A 1. If during the operation, an error condition (MSA error, unit check) is detected by the executive from the external status, the auxilary status or sense byte (byte 0 and byte 1) is requested from the MSA or control unit and returned with the original status at the normal return point. The external status occupies H2 of register A 1 with the secondary status in H 1 of register A 1. The sense bytes are returned in the A Format, that is, 01 = sense byte 0, 02 = sense byte 1.

When the external status specifies a busy status, the executive waits for the control unit end external status and upon receiving it, causes reference to be made to the normal mode return point with the original busy external status in H2 of register A 1.

When an external status specifies a channel end without an accompanying device end, the executive waits for the device end status and then causes reference to the normal mode return point with the device end external status in H2 of register A 1.

Dans le document SYSTEM OPERATING (Page 181-186)