• Aucun résultat trouvé

Queue Manager

Dans le document Program Logic (Page 54-60)

Queue Manager is a general term describing a group of routines used by various system components, such as the reader/interpreter., initiator/terminator, and output writer.

The queue manager performs some common functions for all system components. It performs all input/output for accessing the job queue data set and keeps track of all space on this queue. The queue manager assigns space on the job queue in logical track increments for control blocks, tables, and system messages built by the termination, the terminator enqueues the output work description. The writer then considered a non-demountable system resi-dence volume.

JOB QUEUE INIiIALIZATICN

At system initialization, queue initializa-tion routine IEFSD055 receives control from the SE~ command processor to construct a passes to queue formatting routine

IEFORMAT.

0(0) .

8 byte disk address of the Master OCR MBBCCHHR

8 (8) 1 2

Reserved Displacement of first track

Reserved

Number of tracks reserved Number of tracks reserved for cancelling of job steps for any initiator when queue full

20 (14) 2

Displacement of first track Displacement of last

available logical track containing only job queue records Number of records per

logical track for each Problem Program partition

32 (20) 2 Address of first record on

Number of OCRs on the

first track containing only mixed track

job queue records 36 (24)

The queue formatting routine divides the

system-assigned job class identifiers. The user-assigned job class and corresponding system job class identifiers are: chain jobs first-in/first-out (FIFO) according to priority. All jobs of the tables. control blocks. and system messages are in 176-byte increments. initia-lization, SYS1.SYSJCEQE appears as shown in Figure 21. Figure 22 illustrates typical input and output work queues. Each input and output QCR contains the address of the last entry in each priority queue.

QtEUE MANAGER MODULES

As jobs are read into the system_ they are placed into each job class queue according tc priority (established by the PRTY param-eter on the JOB statement). When the reader/interpreter reads a job or estab-lishes a new queue for an output class. i t establishes a queue entry. This is done by Assign/start Routine IEFQASGT.

Assign/start Routine (IEFQAGST)

The Assign/start routine takes the first track from the available track pool and establishes i t as the first track for a job. The queue manager parameter area

(QMPA) is updated accordingly. (See IBM System/360 Operating system: MVT Job Man-agement. Program Logic Manual, Form

Y28-6660, for a description of QMPA.) An ICE and an ECB are created f0r subsequent input/output operations. The actual reserving of tracks is done by the assign routine, IEFQASGQ.

~: MFT does not support the track-staCking facility of MVT.

Assign Routine (IEFQASGQ)

The assign routine assigns record space on this assignment. If additional logical tracks must be assigned, this routine issues an ENQ macro instruction on the master QCR to prevent concurrent access by other tasks. The master QCR is read into main storage.

0(0) is the reader/interpreter, although the initiator/terminator also uses i t . To requested tracks are acquired. The address of the first available logical track is reader/interpreter, the assign routine passes control to queue manager/interpreter interlock routine IEFSD572. If the reader/

interpreter is resident, control returns to the assign routine to wait for tracks to become available. If the reader/

interpreter is transient, IEFSD572 issues a message to the operator requesting him to

r - Master OCR 36

1 Hold QCR 361

36 Output OCRs (Classes A - Z and 0 - 9)

,15 Input OCRs (Classes A -0)

ASB OCR 36

1

I

RJE OCR

I

1296

1

36 540

7~ I

Control Record Area

1

(21 Unused OCRs) Reserved

f-___ LTH Fi rst 176 - byte record 176

First Logical

Track J

Additional 176 - byte records

'-

,

176

LTH \

176 - byte records

Logical Track Area

I'"

~

r Last LTH

Logical 176 - byte records

Track

eF'igure 21. Sample Job Queue (SYS1.SYSJOBQE) Foz:mat After Initialization If there are no available logical tracks

and the requesting routine is an initiator/

terminator, the assign routine issues a message to the operator stating that queue space has been exceeded and passes control back to the initiator/terminator to cancel the job.

When the requesting routine is assigned the record TTRs, it can read and write

records on the job queue. The master QCR is wz:itten, and a DEQ macro instruction is issued to make the master QCR available to the next user. The record addresses in storage and TTR pointers are contained in the external parameter list of the QMPA.

When available space on the job queue becomes critical, a warning is sent to the requesting task. Logical tracks are

removed from the pool of available tracks and assigned to the job.

If the reply is CANCEL, the interlock routine deletes all queue space assigned to the job, cancels the job, and returns con-tz:ol to the assign routine. Normal initia-tor operation reoovers the partition for further use.

Interpreter/Queue Manager Interlock Routine (IEFSD572)

when the reader/interpreter requests tracks for the job i t is processing, and no space is available, IEFQASGQ passes control to interlock routine IEFSD572 to identify whether an interlock can occur. If the

reader is transient, the possibility exists that space needed by the reader/interpretez:

can be provided only by the termination routines, which must operate in the parti-tion that the reader occupies. Because the requested space is not available, the rou-tine issues a message to the operator re-questing a reply of 'wAIT' or 'CANCEL'. If the reply is WAIT, this routine returns to the assign routine to wait for available space. (If the reader requesting space is a resident reader, no message is issued, and a reply of WAIT is assumed.)

If the reply is CANCEL, control passes to delete routine IEFQDELQ to delete all queue space assigned to the job being pro-cessed (if any space had already been assigned). When control returns, the

interlock routine abnormallY terminates the job with a job-canceled code of 222. Norm-al initiator operation recovers the parti-tion for further use.

\

Queue Manager Enqueue Routine (IEFQMNQQ) After all control blocks for a job have been written, the job is eligible for

selection by an Initiator. Declaring a job ready for selection (enqueuing) is done by Queue Manager Enqueue routine IEFQMNQQ.

When an interpreter has completed the completes processing, the terminator uses this routine to enqueue output data sets, in priority order, on the appropriate out-put work queues.

To prevent concurrent updates, this rou-tine issues an ENQ macro instruction for

Dequeue Routine (IEFQMDQQ)

In addition to dequeuing a job from the input queue for an initiator, the dequeue routine (IEFQMDQQ) removes the output data from an output queue for processing by a system output writer.

The routine issues an ENQ macro

Delete Routine (IEFQDELQ)

~he Delete routine first issues an ENQ

~heECB indicating wait-for-space is posted.

~able Breakup Routine (IEFSD514)

when a reader must be suspended, the job scheduler must prevent the destruction of variable size tables in main storage. To entry is deleted). Therefore, further write requests must specify the Head TTR in the TER parameter list. Before issuing a write request, the caller must retrieve any previously written tables to prevent their being overlaid by the new write request.

If the request is for output of tables, (transferring from main storage to direct-access device), the Head TTR (passed in the parameter list) is used to read the first table queue control record (TQCR). If the Head TTR is zero, the assign routine, IEF-QASGQ, is called to assign space for a new

TQCR. TheTQCR is a 176-byte record processing continues. The low-order byte of the last TTR used in writing the tables desired subpool. IEFSD514 issues a GETMAIN specifying the subpool and the amount of storage required for the table. The remainder of the table is then read into the storage obtained, using read/write rou-tine IEFQMRAW. Each table specified in the parameter list is processed in this IT,anner until 'FF' (hexadecimal), indicating end-of-tables, is found. As each table is read

MET uses the MVT reader/interpreter (read-er). However, because of job class, poss-ible MF~ interlocks, and the capability of using transient readers, some modifications have been made to the MVT modules, and six new modules have been added. These modifi-cations and additions are described below.

MF~ allows as many as three input readers to execute concurrently with prob-lem programs and writers. Resident readers operate in previously defined reader parti-tions, and transient readers operate in problem program partitions large enough to accommodate them. Input stream data for the step being read is transcribed onto direct-access storage where i t is held until execution of the associated job begins. Problem programs retrieve this data directly from the storage device.

In MF~' there are three types of system input readers:

• Resident reader.

• user-assigned transient reader.

• System-assigned transient reader.

Resident and transient readers may operate in the same system ,provided no more than one system-assigned reader is specified, and the total number of readers does not

Dans le document Program Logic (Page 54-60)