Previous Topic: 2.3.4.3.1 Physical Swap Algorithm

Next Topic: 2.3.4.3.3 Logical Swapping

2.3.4.3.2 Working Set Trim

In this section the term working set is used to be compatible
with the IBM references on ASM operation.  You should be
aware that this is a third definition of working set.  This
version of the working set is a pragmatic attempt to keep
enough pages at swap-out to ensure minimal paging at swap-in.
As such, the swap working set determination includes more
pages than might be in the Denning working set.

Working set trim makes page frames available for immediate
stealing and indirectly determines the number of non-LSQA
pages that will be swapped.  An address space can be trimmed
down to its minimum for storage isolation (see the PWSS
parameter in the Initialization and Tuning Guide) if such a
minimum was specified.

Working set trim attempts to selectively protect unreferenced
pages from being stolen.  Referenced pages are never stolen,
because they must be paged-out to the swap data sets by the
extended swap algorithm.  The method by which working set
trim discriminates between pages that should and should not
be made available for stealing is different for physical and
logical swaps.

PHYSICAL SWAP WORKING SET TRIM

For address spaces that are being physically swapped-out,
working set trim is based on elapsed time since the last
unreferenced interval count (UIC) update.  When a physical
swap is initiated within 1/2 SRM second of the last UIC
update, then unreferenced pages with a UIC of zero are not
trimmed.  This protects pages that might be frequently
referenced, but were unlucky enough to have their reference
bit turned off by the very recent UIC update.  It is assumed
there has not been sufficient time for the page to be
referenced again.

LOGICAL SWAP WORKING SET TRIM

For address spaces that are being logically swapped-out,
working set trim is based on current utilization of real
storage.  Unreferenced pages within a UIC of up to 23 are not
trimmed if their UIC is less than the integer part of the
following calculation:

           1 + (System Average Max UIC - 30) / 10

Thus, logically swapped address spaces are always trimmed
less severely than physically swapped address spaces because
this calculation has a minimum value of one.  The purpose of
this algorithm is to protect more pages from being trimmed as
more real storage is made available.