gtpc3m0hConcepts and Structures

TPF System Parallel Processing

The TPF system was originally designed on the assumption that programs execute on a single central processing unit (CPU), commonly called a uniprocessor. A synonym for CPU, used in the TPF publications, is instruction-stream engine or simply I-stream engine. An I-stream engine is just a CPU within an ESA configuration. Several instruction-stream engines can be combined into a single ESA configuration and can work either together or independently.

There are two senses of parallel processing enabled by this architecture. One sense considers two or more ESA configurations. In the TPF system, there is a facility for several ESA configurations to operate as a single complex, called loosely coupled. The other sense considers a single ESA configuration where multiple I-stream engines execute concurrently; this is called tightly coupled. Combining these two senses of parallel processing means that an ESA configuration running the TPF system in 1, 2, or as many as 16 I-streams, tightly coupled, can be tied together with other tightly coupled ESA configurations in a loosely coupled complex of up to 32 ESA configurations to yield the processing power of all these combined I-stream engines. Figure 2 shows two ESA configurations, each with four I-stream engines (CPUs).

Tightly coupled multiprocessing refers to the synchronization of accesses to shared main storage in an ESA configuration of multiple I-stream engines. An ESA configuration with only one I-stream engine is called a uniprocessor, and one with multiple I-stream engines a multiprocessor. Uniprocessor and multiprocessor are terms within the TPF system that are associated with tightly coupled multiprocessing.

Loosely coupled multiprocessing involves two or more ESA configurations sharing a set of module (sometimes referred to as DASD) control units (CUs) along with an external lock facility (XLF) for synchronizing accesses to the module records by multiple ESA configurations. XLF is logic in the module CU or a coupling facility (CF) called by any ESA configuration attached to the module. This implies that all the participating ESA configurations are channel attached to the same module CU or CF.

Multiprocessing and Multiprogramming

System diversity provides multiprogramming and multiprocessing capabilities within the TPF system. Multiprogramming and multiprocessing are incorporated to increase the number of messages that can be processed over some interval of time, usually given in messages for each second.

The phrase parallel processing is useful to describe multiprogramming and multiprocessing because whatever the name, the three Ss cannot be overemphasized:

A description of parallel processing emphasizes those moments where a program or processor must wait because a shared resource is already accessed by another program or processor. Some of the moments of synchronization are handled exclusively by the hardware, while others form part of the TPF software structure. When the software becomes involved in synchronization moments, the granules of time become longer than those taken by the hardware and the details become more important if the system is to be understood. When there is a failure to synchronize processes properly, competing processes can mutually block each other, possibly degrading the performance of the entire system (this is called deadlock).

There are some ideas we assume from the outset. For instance, the notion of operations executed on a computer is taken for granted. An operation is a rule for deriving output from a given input within a finite time; that is, when an operation is executed by a computer, it always ends in a prescribed interval. ESA instructions are examples of operations. A sequential process, or simply process, involves the execution of a set of operations in a prescribed order for the purpose of producing a result. The result of a process is not required to be produced in a prescribed interval, but a process must end. Some useful sequences of operations, however, never end; for example, a control sequence of code that accepts work on demand. A program is the passive form of a process.

Concepts of Parallel Processing

Various concepts have developed that help us understand the complexities of parallel processing.


Table 3. Deadlock

Time Process X action Process Y action
t(1) Process acquires resource A Process acquires resource B
t(2) Holding A Process requests A but is told to wait; Holding B
t(3) Process requests B but is told to wait; Holding A Waiting for A; Holding B
t(4) Waiting for B; Holding A Waiting for A; Holding B

·
·
·

·
·
·

·
·
·
t(infinity) Waiting for B; Holding A Waiting for A; Holding B

Deadlock

Ordinarily, deadlock does not occur. However, it does occur when all of the following conditions are met:

When these conditions are combined, a resource can become unavailable. The standard example is of two processes, each of which requires two tape drives. When each process gets one tape drive and waits for the other, deadlock occurs. To elaborate, suppose a system has only two tape drives:

Unless one of these processes is interrupted in some way (timed out, for instance) or ended, the two tape drives will continue to be held for a very long time.

Of course, if both processes wait indefinitely, an attribute for being a process is lost, that is, terminated, and some currently held resources are not released in a finite time. Normally, it is not practical to expect a process to include a time-out facility to ensure that shared resources are released in a finite time. However, it is expected that there is an external mechanism that can time out a process when necessary.

Deadlock can be detected and eliminated with system timeouts and process deletions. The TPF system protects itself in these and other ways from deadly embrace.

Deadlock Detection

The TPF system provides a deadlock detection routine to assist in detecting deadlock conditions. The routine is time-initiated and is activated during restart. If a deadlock condition is detected, a deadlock user exit (CLUD) is activated on the processor where the deadlocked ECB is located. Return code 8 is the default. Following are the return codes provided by the user exit:

You can use the ZECBL command to force a deadlocked ECB to exit with dump D9.