• Aucun résultat trouvé

Communications Task Modules

Dans le document Program Logic (Page 43-46)

The communications task (Chart 16) receives control through interruptions which occur when commands are entered or messages are written. The following paragraphs describe the seven major routines of the communica~

tions task.

Console interruption routine (IEECVCRA):

notifies the communications task wait rou-tine that a console read has been

requested.

Communications task wait routine

(IEE-£VCTW): waits for all WTC/WTCR requests and console interrupts and calls the com-munications task router routine.

Communications task router routine

(IEE-£VCTR): determines the type of request or interruption that occurred and passes con-trol to the appropriate processing routine.

Console device processor routines

(IEE-£v"PM) : performs console read and write

o~erations and error checking.

write-to-operator routine (IEECVWTC): man-ages wTO buffers.

~rite-to-operator with reply routine

(IEE-y~'IOR): ~anages W'IOR buffers.

External interruption routine (IEECVCRX):

switches to the alternate console device when an external interruption occurs.

Commands are issued through the console recognizes the interruption and passes con-trol to the I/O supervisor. The I/O super-visor determines that the interruption is an attention signal and passes control to the communications task console interrup-tion routine in the nucleus. The console interruption routine posts the attention event control block (ECB) in the unit

The communications task wait routine waits on all communication ECBs associated with ~'I"O/w'I"OR. The wait routine issues a multiple WAIT macro instruction on a list of ECBs contained in the UCM. When one of the ECBs is posted, as by attention or external interruptions, the wait is satis-fied and the communications task thus becomes ready. When i t becomes the active task, i t issues SVC 72. This SVC includes the console communication service routines and the router.

Th.e communications task serves a number of purposes. The first segment of SVC 72, called the router, distinguishes among these purposes and establishes the order of response. When a posted ECB is found by the router., the router passes control to the specified processor routine via an XCTL macro instruction.

The console-device processor routines read and write using the EXCP macro instruction. The processor routines con-sist of a routine to service external interruptions and three device-oriented routines: 1052 Printer-Keyboard routine, card reader routine, and printer routine.

Each of the three console input/output pro-cessor routines is associated with an OPEN/

CLOSE support routine, which provides data management and input/output supervisor con-trol blocks. The specified processor rou-tine reads the input message into a buffer area and calls the master scheduler task via an SVC 34.

The write-to-operator routine moves the text from the requesting program's area to a buffer area within the nucleus and posts the communication ECB for

write-to-operator.

The write-to-operator with reply routine generates a message ID, ,including a parti-tion identifier, and creates a reply queue element (RPQE) to handle the operator's reply.

The external interruption routine, residing in the nucleus, switches to an alternate console device when the operator presses the INTERRUPT key on the console.

CONSOLE ATTENTION INTERRUPTION ROU'lINE (IEECVCRA)

The console attention interruption routine (IEECVCRA), operating in privileged mode, posts the communications task attention ECB to request reading of the console. Input/

output interruptions are disabled without destroying register contents, and without macro access to supervisor services. using the address of the UCB (found in register

COMMUNICATIONS TASK WAIT ROUTINE (IEECVC~W)

Upon entry from the dispatcher, the com-munications task wait routine (IEECVCTW) issues a WAIT (with a count of one) console attention interruption routine satisfies the wait, causing the TCB to be

COMMUNICAUONS TASK ROUTER (IEECVCTR)

~he communications task router (IEECVCTR) is the first segment of SVC 72 brought into the transient area. Because the communica-tions task serves a number of purposes, and many service requests may be pending, the router establishes the order of response.

~he order is: external interruption, input/output l i s t completion, attention

(console interruption), and WTO/WTOR. Mul-tiple attentions are treated in order of Con-sequently, processor routines return con-trol to the router by issuing an XCTL macro

CONSOLE DEVICE PROCESSOR ROUTINES (IEECVPMX, IEECVPMC, IEECVPMP)

Control flow in a processor routine is determined by the setting of flags in the router-selected UCM entry. The close flag is tested first. If this flag is on, any pending input/output activity is suspended by issuing a WAIT macro instruction. Con-trol is then passed to an associated OPEN/

CLOSE support routine via an XCTL macro instruction for release of various control blocks. If the close flag is off, the busy

flaq is tested to determine input/output status. If there is outstandinq input/

output activity, error checking and buffer disposition occur if the activity has been posted complete. otherwise, any attention request is temporarily abandoned(as are output requests), and control returns to dependent interface is constructed. Input/

output activity is initiated by issuing an input/output activity. This preserves a means of retrying the message if an

extern-al interruption intervenes before the mes-sage is successfully presented to the cur-rent device. since output buffers are always selected from the top of the queue, the initiation of output to an alternate device is unaffected by previous attempts to present the message to the primary device.

Having selected a buffer, the processor routine establishes data management and input/output supervisor (IOS) control block linkages. The routine then issues an EXCP macro instruction for a 1052, or a WRITE macro instruction for a printer. without awaiting completion of the input/output, the processor routine returns to the router via an XCTL macro instruction.

WRITE-To-OPERATOR ROUTINES (IEECVWTO AND IEEVWTOR)

The write-to-operator routine (SVC 35) writes operator messages on the console when a WTO or WTOR macro instruction is

issued by system component programs or problem programs. Messages and replies are buffered; the period of time between issu-ing the message and receivissu-ing the reply is available for processing. Issuance of either macro instruction causes an SVC interruption. When the SVC interruption is handled, the supervisor causes the write-to-operator routine to be loaded into the macro instruction results in the addition of a ~~o Queue Element (WQE) to the buffer queue; each WTOR results in the addition of a Reply Queue Element (RPQE) to the reply queue. SVC 35 (IEECVWTO) sets up the prob-lem program message. If i t is a WTOR, the write-to-operator-with-reply routine

(IEEV-W~OR) inserts the message identification (ID) in addition to a partition identifier.

E:XTERNAL INTERRUPTION ROUTINE (IEECVCRX)

~he external interruption routine assigns functions performed by the primary console device to an alternate console device.

When the operator presses the INTERRUPT key on the console, an external interruption occurs and control passes to the supervi-sor. The supervisor identifies the inter-ruption and passes control to the external

interruption routine which s.witches con-soles and returns control to the supervi-sor. Console functions may later be reas-signed to the primary console device, if the operator causes another external interruption.

Communications Task with

Dans le document Program Logic (Page 43-46)