THE WAIT/POST ROUTINES To suspend its execution, the requesting task calls DMTWAT, which
inspects the synchronization locks RSCS uses to synchronize task
execution. Cempletion of a service is signaled by aeans of a synch
lock, which is set (or "posted") by DMTPST. SYNCHRONIZATION LOCKS Synchronization locks (or "synch locks") are fullwords contained in task
save areas or centrol tables (such as TAREA or IOTAELE). Synch locks
are also found in control areas in function selector routines sucb as REXCYCLE in medule DMTREX. The syncb lock must be set to zero before the request for services is
made. Setting the synch lock to zero prepares it for processing ty the WAIT routine.
The first byte of the full word may contain either a zero or a "post code." If the first byte is zero, the task is nondispatchable, tecause the requested service has not yet been performed. A post code is a cooe which sets tc one any bit in the first byte of the synch lock. D!TPST sets such a bit to specify that a requested service has been completed.
The requesting task, that is, the caller of tMTWAT, may specify tbe address of a single synch lock (as in the case of a GIVE Tatle or an IOTABLE) or the address of a list of synch locks (as in the case cf REXCYCLE), one of which must be posted by before dispatching cf
the requesting task can resume. Figure 8 shows the contents of Register
1 on a call. Rl Synch Lock r-----------, r -, 1 A (Sy ncb Leck) 1--------> I I OOOCOO 1 L-- _______ --' L
-- OR -- Rl r r-- ---, ,--------.1 1 1 A (List Address) 1----> 1 A (Synch Lock) 1--' L-- -' 1 I IA(Synch Lock) 1--------- I 1 / /
/ / 1 , Synch Lock I >1 0 Synch Lock
r >1 0 IA (Synch Lock) 1-, Synch Lock
L 1 r , '-- __ >1 0 1 Figure 8. InFut to the DMTWAT Routine
3-22 IBM VM/370: System Logic and Problem Determination--Volume 3
ASYNCHRONOUS INTERRUPTIONS AND EXITS Asynchronous interruptions result from processes external to RSCS. For example, during REX task execution, the RSCS operator may press the ATTN key on the Rses console, thereby asynchronously interrupting executicn
of the REX task.
To handle asychronous interruptions, RSCS tasks contain asynchronous
exit routines. These asychronous exit are set up during
initialization without dispatching the task being requested to perform
the req.uested service. Asynchronous exits are provided for external
interruptions, for certain I/O interruptions, and for ALERT requests
that occur during execution of another task.
Asynchronous exits are taken after a task calls DHTASY specifying the
requested exit conditions and the entry address of the asynchronous exit
routine. DHTASY also handles external interruptions reqeusted for the clock
comparator. The request element is queued on the asynchronous exit queue· and Frccessed by DHTEXT. The DMTASY clock comparator provides a time delay mechanism by using the CPU hardware clock comparator.
Asynchronous exit rOut1nes perform limited function, often enqueueing
requests for further processing at a later time by dispatched tasks. When the asynchronous exit routine completes processing, it returns
control to the Supervisor, which then resumes dispatching tasks via a
call to the dispatcher (DMTDSP). USING ASYNCHRONOUSLY REQUESTED SERVICES: DMTWAT Before a task can use the results of an asynchronously requested
service, it must ensure that the service has been performed. To ensure
that the service has been performed, the calling task signals that it is
waiting for completion of a service via a call to the supervisor routine DMTiAT, specifying the synch lock associated with the requested service.
If the high-order byte of the task's synch lock is nonzero when DMTiAT inspects it, control is returned directly to the calling task.
If the byte of the synch lock is zero, DMTiAT marks the
calling task nondispatchable (via the task's request element), stores
the address of the task's request element in the low-order bytes of the
synch lock, and resumes dispatching for other tasks. POSTING A SYNCHRONOUS LOCK When the requested service is complete the REX Task signals completicn ty calling the POST routine (DMTPST), specifying the requesting task's
associated synchronization lock. The POST routine sets the high-order byte of the synch lock to nonzero. This is referrred to as "posting" that synch lock, and indicates that the requested service is complete. RSCS Introduction 3-23
Previous Page Next Page