gtpd1m34 | Database Reference |
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:
- Automatically notify TPF systems when the shared data is changed.
The TPF system keeps track of who is using a particular piece of data and
notifies them when an update to the data makes their locally cached version
obsolete.
- Determine when your copy of shared data is valid by checking
system-maintained validity indicators for your locally cached copies of shared
data.
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.
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.
This section discusses some benefits of using CF cache structures.
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.
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.
A cache system contains the following elements:
- CF cache structure, which is a structure in the CF that
contains a directory to keep track of data that is shared among cache
users. TPF systems that are connected to the CF cache structure can
manage shared data.
- Permanent storage, which is storage that is the final
repository for the data that TPF systems share and might be on DASD.
TPF systems can read the data from permanent storage to local cache buffers
and use the directory-only caching method to track the validity of the
data. After TPF systems make updates to the locally cached data, they
are responsible for ensuring that the changes are made to the permanent
storage copy of the data. They make these changes to permanent storage
either immediately after the update or at a later time depending on the cache
protocol. See TPF Application Programming for
more information about permanent storage and the relationship to logical
record caches.
- Local cache buffers, which are buffers that TPF systems
allocate in their own storage area. They contain copies of data that is
shared among cache users. TPF systems read data from permanent storage
to their local cache buffers and write data from their local cache buffers to
permanent storage. Each TPF systems that accesses the CF cache
structure must have a set of local cache buffers to accommodate the data to be
shared. See TPF Application Programming for
more information about local cache buffers and their relationship to logical
record caches.
- Local cache vector, which is a vector that provides a way for
CF cache users to determine if data in their local cache buffers is
valid. There is one local cache vector for each TPF system using the
cache. Each vector is divided into separate entries with each entry
corresponding to a local cache buffer. Each vector entry contains an
indicator that the CF sets to indicate whether the data in the corresponding
local cache buffer is valid.
The TPF system supports processor unique caches and processor shared
caches:
- Processor unique cache contains cache entries that are used by
only one processor in a loosely coupled complex.
- Processor shared cache contains cache entries that are kept
synchronized between all processors in a loosely coupled complex that are
using the cache.
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