Queues: Print, Batch, and Server

Queues are clusterwide lists of jobs scheduled for execution. The OpenVMS queuing system is used for three main purposes: (1) sending output to printers (print queues), (2) scheduling the execution of command procedures (batch queues), and (3) submitting files to be processed by a given program, which usually runs as a detached process (server queues).

The DCL commands PRINT, SUBMIT, SHOW QUEUE, SET QUEUE, SHOW ENTRY, SET ENTRY, and DELETE/ENTRY are the principal commands used to interact with queues. Their use is described in Chapter 7, "The User Environment:", "Working with Queues."

Some queues are generic and route jobs to the next available execution queue to perform the work. For example, a generic print queue routes print jobs to the next available printer queue.

Printer execution queues can execute one job at a time. Batch execution queues can execute multiple jobs simultaneously, but this number is limited by the system manager and can be adjusted while the system is running. Server queues may be able to process more than one job at a time, depending on the application processing the work.

A generic queue may be assigned to execution queues on different systems in the cluster. For example, a print job might be routed to a printer attached to another system.

Requests are assigned a queue entry number based on the order in which they arrive. If all execution queues are busy, as when several users request printing at approximately the same time, the remaining jobs wait in the generic queue until an execution queue is available.

Queue entries are assigned priorities, with the highest-priority jobs executing first. Within a priority level, the oldest job is executed first. Printer queues may optionally be set to print the smallest waiting job first.

Print Queues

Print queues keep track of print jobs submitted by system users. For example, several users may wish to print files at approximately the same time. Let's imagine an OpenVMS system with three printers. Let's say that printers LASER1 and LASER2 are ordinary small-office printers, but that BIGPRINTER is a very-high-speed, heavy-duty printer suited to printing very large print jobs.

In this case, the system manager might set the queues for LASER1 and LASER2 to accept jobs of 200KB or less, but that BIGPRINTER to accept jobs of 150KB or more.

The default generic printer queue SYS$PRINT can accept print jobs of any size and route them to a printer with the right capabilities. When a user issues a PRINT command without specifying a particular queue, the job will be entered into the generic printer queue SYS$PRINT. The OpenVMS queuing mechanism will route the job to the next available execution queue whose capabilities match the print job. A job of 50KB will be routed to either LASER1 or LASER2, whichever becomes available first. A job of 175KB can be routed to any of the three, but a job of 500KB will be routed only to BIGPRINTER.

click to expand
Figure 3-2: Generic and Execution Queues

Similarly, system managers can define a number of site-specific forms (paper stock) that users may specify for their jobs (e.g., letterhead, plain paper, 132-column continuous-form paper) as well as site-defined characteristics that can represent any printer attributes the system manager chooses.

A user may decide to place a job into a particular execution queue. However, this will not result in faster service; any jobs in the generic queue that would have been printed before it will still be executed first.

See Chapter 7, "The User Environment," for information about printing files.

Batch Queues

Collections of commands called command procedurescan be submitted to a batch queue to be executed on a user's behalf. When a batch job starts, a batch process is created to execute the command procedure. Optionally, a logfile is produced, recording the progress of the batch job and any system messages generated during the execution of the procedure.

Batch jobs can be scheduled to run at a certain time and can be programmed to resubmit themselves at intervals.

A batch execution queue may execute several jobs simultaneously. Even so, the system manager can place a limit on the number of batch jobs that can execute at a given time, so a batch job is not guaranteed to start at the time specified by the user.

Server Queues

Virtually any type of file may be processed with server queues. Because this is a rather ambiguous description, this book will provide an example based on a popular real-world application.

An OpenVMS system may be directly connected to the Internet to act as an e-mail server for many users. When an e-mail message arrives, it is in the form of a text file received over the network from some other computer. It may be from a remote server, bound for some local user, it may be from a local user's personal computer, bound for someone on another continent.

The e-mail program must process each incoming and outgoing message to determine its destination and forward it to the next server or place it in a local user's mailbox.

The e-mail program may choose to use an OpenVMS server queue to hold a list of messages waiting to be processed. The program can take the first job in the queue and process it without worrying about any other pending messages. If there is a network problem, such as an unreachable remote server, the e-mail program can simply place the job back in the queue, scheduling it to be reprocessed at a later time, and move on to the next job in the queue.

The details of list maintenance and scheduling waiting messages need not be done by the e-mail program, but can be handled by the OpenVMS built-in queuing mechanism.

Summary

This section has introduced some of the concepts relevant to a multiuser operating system. Additional issues, such as file-ownership user profiles (accounts), are described in later sections.



Getting Started with OpenVMS(c) A Guide for New Users
Getting Started with OpenVMS: A Guide for New Users (HP Technologies)
ISBN: 1555582796
EAN: 2147483647
Year: 2005
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net