Friday, December 22, 2023

Program Compression

 CICS program subpool is separated from other subpool and is allocated from top down. Program compression means non-resident programs which are not in use is deleted during SOS.  The PPT is scanned to identified such program which may be reloaded in the war future. So program compression is a resource intensive operation. 

SCP maintained a minimum address for program subpool to keep the other data subpools from invading the program storage.  Program storage allocated below the threshold are freed as soon as the program use count is zero. 

CICS GETMAIN SOS

GETMAIN is issued by user program or by CICS routines on behalf of the user task.  Storage will be allocated from existing subpool page if available, or a new page if there is free page in DSA. When storage becomes a not available to satisfy a GETMAIN request, the task will be suspended with a DCI value set. The system enters a SOS condition and program compression is activated to try to release storage. 

CICS will then retry the GETMAIN from the suspended tasks and if successful, CICS will turn off the SOS condition. Otherwise, the SOS will continue.  This action also happened when a FREEMAIN happens during SOS. 

Task Storage

 TCA is created in the task subpool when a task was attached. The storage acquired by a task is chained from TCA SAA with the most recently acquired storage at the front of the chain. The next allocation is found in the SAA. The last area points to the STCA. 

TIOA is chained off from TCTTE instead of TCA because there is a chance that the task has gone when its terminal message still waiting to be sent. 

Free Area Queue Element

 FAQE is used to chain up free space within pages of same subpool. It is allocated after the storage area requested.  The element is linked by a double linked list  

Adjacent free areas will be consolidate upon RELEASE. If the FAQE unit s corrupted by user program, this type of storage violate can be detected earlier than using SAA. When it t happens, a dummy FAQE is created. 

PAM byte maps

 The byte map is used to indicate if the corresponding DSA page was in use or not. If in used, which subpool owns the page. 

There is a second byte map used to record some extended information for some of the subpools. 

CICS Subpools

 Control subpool is used to keep CICS control blocks such as DCA. The allocation is typically small and use a first fit algorithm. It uses 4 bytes SAA. 

Teleprocessing subpool contains TIOA. This subpool is usually large when there is a big network. The pool uses 8 bytes SAA and with end SAA to detect storage violation. 

Task subpools is used to hold control structures related to task such as TCA and VSWA. Program’s working. Storage and linkage section storage are also allocated out of this subpool. The storage requested by program at different time is not contiguous. The storage chain is addressed from TCA. As the storage is under control of user programs, CICS uses 8 bytes SAA and duplicate SAA at end of the area 

Shard subpool contains TS main storage and BMS. Four bytes SAA s used and no duplicate SAA

CICS SAA

 Storage accounting area has 2 formats - 4 bytes or 8 bytes. Some subpool has a duplicated saa ar the end of the storage area.  The saa at end of the storage is used to detect storage violation when the task write beyond the requested area. The saa contain a byte value that is stored see to initialize the storage. 

The 8 byte format contain extra field that chain up the next area belongs to the same task  subpool under the control of CICS (less susceptible to storage violation)uses 4 byte saa