If a page is not in transit, a page frame of real storage aust be
allocated to fill the request. Before the allocation routine is called,
a test is made to see if the caller wishes the return to his routine or
to be delayed until after the requested page is available. If theDEFEB option is not requested, DMKPTBAN returns to the caller after first
building and stacking aCPEXBLOK that allows processing of the page
request to be continued the nexttime the dispatcher (DftKDSPCH) is
entered.DMKPTBAN next calls the FBEELIST manager (DMKPTBFB) to obtain the
address of the next availableCOBTABLE entry. DftKPTBFB aaintains a
first-in-first-out list of theCOB TABLE entries for those page fraaes
that are immediately available for assignment. AsDMKPTBFB releases
these page frames, a check is made to see if the number of entries on
theFREELIST has fallen below a dynamically aaintained ainiaua value. If
it has, the page selection routine(SELECT) is called to find a suitable
pageframe for placement in the FBEELIST. The number aaintained as the
FREEL1ST threshold has a value equal to the number of users in queue1
plus the number of users in queue2 plus 1.
The FBEELIST is replenished directly by users releasing virtual
storage space. The page-out routine,DftKPGSPO, calls DftKPTBFT to place
released pageframes directly on the FBEELIST. However, aost replenishment is done via the page selection routine, SELECT. SELECT is
called byDMKPTBFB when the FBEELIST count falls below the current
minimum, or when a user page is reclaimed fro. the FBEELIST. In either
case, the selection algorithmattempts to find a page to swap to
auxiliary storage. The highest-priority candidates for a swap are those
page frames whoseCOBTABLE entries appear on the FLUSHLST. SELECT attempts to take a flushed page frame before it takes a page fraae froa an active user. If such a page frame is found, it is checked to see if
it has been changed since page-in•. If it has not, it is placed in the
FBEELIST byDMKPTBFTi otherwise, it is scheduled for a swap-out by dequeuing the COBTABLE entry from the FLUSHLST, constructing a CPEXBLOK for dispatching after I/O completion, and exiting to DMKPAGIO by a GOTO. After the paging I/O is complete, the entry is placed on the FBEELIST via a call to DMKPTBFT. If no pages are found on the FLUSHLST, the selection algoritha
examines each page in real storage, searching for an available page that
does nothave its reference bit It begins the search at the first
available page at the high end of real storage and searches by
descending page address.When it reaches the lowest available page
address, it starts againfrom the top of storage. When a page has been
found, that page address minus one is checkpointed. The nexttiae the
selection algoritha is invoked, it startsfrom the checkpointed address.
As the selection process proceeds, those pages thatwere not selected
have their reference bits turned off.When the selection algoritha is
operating in thismode, a virtual page must be referenced at least once
per reset cycle (loop around real storage) to avoid selection.Once a page frame has been selected and page-out is scheduled,
control is returned toDMKPTBFB, which then passes control back to DMKPTBAN with the address of the COBTABLE entry that was allocated. In most cases, page-outs are completely overlapped with page-ins.
Approxiaately one half of all page-ins require a corresponding page-out.Once a page frame has been assigned, DMKPTBAN checks to see if a
page-in is required. It usually is, and theDASD address of the virtual
storage pageaust be obtained froa the user's swap table entry and the I/O operation scheduled. However, if the page frame bas not yet been
referenced (as indicated by aDASD address of zero), the real aain storage page frame is set to zero, and no page-in is required. After CP Introduction 1-109
allocated to fill the request. Before the allocation routine is called,
a test is made to see if the caller wishes the return to his routine or
to be delayed until after the requested page is available. If the
building and stacking a
request to be continued the next
entered.
address of the next available
first-in-first-out list of the
that are immediately available for assignment. As
these page frames, a check is made to see if the number of entries on
the
it has, the page selection routine
page
FREEL
plus the number of users in queue2 plus 1.
The FBEELIST is replenished directly by users releasing virtual
storage space. The page-out routine,
released page
called by
minimum, or when a user page is reclaimed fro. the FBEELIST. In either
case, the selection algorithm
auxiliary storage. The highest-priority candidates for a swap are those
page frames whose
it has been changed since page-in
FBEELIST by
examines each page in real storage, searching for an available page that
does not
available page at the high end of real storage and searches by
descending page address.
address, it starts again
found, that page address minus one is checkpointed. The next
selection algoritha is invoked, it starts
As the selection process proceeds, those pages that
have their reference bits turned off.
operating in this
per reset cycle (loop around real storage) to avoid selection.
control is returned to
Approxiaately one half of all page-ins require a corresponding page-out.
page-in is required. It usually is, and the
storage page
referenced (as indicated by a