Natural Swap Pool Operation

The following situations are explained:


Users are On their Way to Natural - No Session Start

If the user's work area is held in the swap pool, the corresponding slot is read and decompressed into the Natural user thread. The corresponding swap pool directory entry is unlinked from the directory chain and declared as a free entry. If it was a guest, the guest table will be updated.

If the user's work area is not held in the swap pool, it is read and decompressed from the Data Space or from the swap file (or roll facility under CICS) into the Natural user thread.

Natural is activated.

Users are Returning from Natural

Natural checks whether the compressed length of the user work area exceeds the highest slot size of the logical swap pools.

If it exceeds the highest slot size, the user work area is compressed and written asynchronously to the swap file (or rolled to the roll facility, which is associated with the session under CICS).

If it does not exceed the highest slot size, Natural finds out whether there is a free slot in the user work area's own swap pool:

  • If there is a free slot, the user work area is compressed into this slot. The corresponding directory entry is linked into the directory chain as latest entry.

  • If there is no free slot, Natural finds out whether there are guests in the user work area's own logical swap pool.

    If there are one or more guests, a slot is made available: The oldest guest-table entry is unlinked from the guest table and the second oldest is made oldest guest. The adequate directory entry is unlinked from the directory chain.

    If there are no guests, a slot is made available: The oldest directory entry is unlinked from the directory chain and the until then second oldest is made oldest.

  • If ESA Data Space is generated and there is a free slot available, this slot will be used before a thread will be rolled out into a swap file.

The compressed user area of the unlinked user is transferred to the write buffer and written asynchronously to the swap file (or rolled synchronously to the roll facility, which is associated with the session under CICS). The current user's work area is compressed into the slot which has become available. The corresponding directory entry is linked to the directory chain as latest entry.

The statistics tables for swap pool reorganization and slot size calculation are updated.