12 Multiple Task Programming

Performance Considerations

When deciding how to manage system resources, some thought needs to be given to performance. For example, should a program wait for a printer to become free or should it spool its output? If waiting is a frequent occurrence, should another printer be added to the computer? Should a printer be added to a terminal?

Database Performance

When multiple users are accessing a database, only the part which is to be modified should be locked. This method allows access to other parts of the database without waiting for each program to complete its processing.

Another method is to modify database information indirectly. Any changes are put in a transaction data set or file. Then, at the end of the day, one program locks the entire database and processes the transaction. This method allows more rapid access to the database during the day and ensures that the data remains constant.

Output Performance

If an output bottleneck is caused by having only one system printer, there are four options available. The first option is to use the HP-UX spooler. For this you must define the printer as type PIPE in the global configuration file eloq.config and pipe the output to the HP-UX command lp, with appropriate parameters. You can pipe the output to any HP-UX command, but lp is usually used. Of all the four options available, this option is preferable.

The second option is for each program to send its output to a spool file. Then a program can output the spool file contents to the printer at the end of the day or at any specified time. This ensures that other programs will not tie up the printer when output is needed immediately. This is accomplished by using a file name as the device specifier in the PRINTER IS statement. Spool files are described in page 249 . Syntax for the PRINTER IS statement is as follows:

PRINTER IS "file name"

To output the file, use the COPY statement.

PRINTER IS 0

COPY "file name"
The third and fourth options include adding a printer to the system. The printer can be added to the system for all terminals to use, or it can be added to a terminal. If one terminal is continually using a printer but the other terminals only use a printer occasionally, add the printer to the busy terminal. If all terminals are keeping the printer busy, add a new printer to the system.


Eloquence Language Manual - 19 DEC 2002