gtpd1m34Database Reference

Coupling Facility Cache Structure Concepts

A CF cache structure allows high-performance sharing of frequently referenced data in logical entities and provides you with data consistency and high-speed access to data. Data consistency means that you can develop protocols to ensure the data that they share is valid. High-speed access means that you can develop data sharing programs and protocols with improved performance. You can do the following:

The TPF system supports directory-only CF cache structures. See Elements of a Cache System for more information about directory-only CF cache structures. See Benefits of Using Coupling Facility Cache Structures for more information about data consistency and high-speed access to shared data.

Terminology

The following lists terms that describe the basic concepts that are important to understand the CF cache structure.

 deregistration/deregistering interest 
A way to indicate to you information about the validity of a piece of shared data. If you have a registered interest in a piece of shared data, you can have your interest deregistered if that piece of shared data has changed and the local copy of the data is no longer valid. When a piece of shared data is updated, the TPF system indicates to those interested, through the associated local cache vector entry, that the piece of shared data has been changed. The copy of the data in the local cache buffer is then considered to be not valid. This process is also referred to as invalidation of local cache copies of pieces of shared data.

 directory-only cache 
A CF cache structure that contains directory entries but not pieces of shared data. See Elements of a Coupling Facility Cache Structure for more information about a directory-only cache.

 invalidation 
See deregistration/deregistering interest.

 registration/registering interest 
A way to indicate to you information about the validity of a piece of shared data. If you use the CF cache structure, you can register interest in a piece of shared data. When you register interest in a piece of shared data, an association is formed between the local cache vector entry associated with your local copy of the data and the directory entry for the data in the CF cache structure. When interest has been registered, the TPF system uses the local cache vector entry to indicate whether the data in your local cache buffer is valid. If you have registered interest in a piece of shared data, the copy of that data in your local cache buffer is considered to be valid.

 valid data 
The state of data in your local cache buffer. If your copy of a piece of shared data is valid, the copy contains the latest changes. If a copy of the data is not valid, it does not reflect the latest changes. See also registration/registering interest.

 validation 
See registration/registering interest.

Benefits of Using Coupling Facility Cache Structures

This section discusses some benefits of using CF cache structures.

Data Consistency

You can use the CF cache structure to keep track of data that resides in the local cache and in permanent storage. No matter how you store data that multiple TPF systems share, each CF cache structure is expected to maintain a local cache buffer to contain a copy of the data. By using a directory in the CF cache structure and a mechanism called cross-invalidate to inform TPF systems of changes to data, each TPF system in the complex can keep track of whether locally cached copies of the data are valid; that is, whether the copies contain the latest changes.

The directory allows you to refer to named data items that you can store in local storage. Cross-invalidate processing involves setting an indicator in a local cache vector for each of the TPF systems to indicate whether the locally cached copy of the data is valid. TPF systems must test the indicator to determine if their copy is valid and, if the data is no longer valid, they must read the data from permanent storage to obtain the most current copy.

High-Speed Access to Shared Data

You can use the CF cache structure to keep track of shared data that TPF systems maintain in their local cache buffers. Accessing data stored in the local cache buffer is the quickest way for a TPF system to access the shared data. However, if the TPF system has invalidated the local copy because another system has updated the data, the TPF system must gain access to the data from permanent storage.

See TPF Application Programming for more information about local cache buffers and permanent storage.

Elements of a Cache System

A cache system contains the following elements:

The TPF system supports processor unique caches and processor shared caches:

Figure 62 shows the elements and their relationship to each other for a processor shared cache. Each piece of shared data can be stored in different locations in the cache system. Copies of shared data are stored in the local cache buffers (fastest access) belonging to each cache user. The shared data also resides on permanent storage (slower access to the data than from the local cache). In general, how quickly you access the data depends on where it is stored.

Figure 62. Elements of a Cache System for Processor Shared Cache


Figure 63 shows the elements and their relationship to each other for a processor unique cache.

Figure 63. Elements of a Cache System for Processor Unique Cache