Kris Buelens wrote:
There is handshaking between Linux and VM, and even more than one flavor....
The fact that z/VM still likes to have some expanded storage is that the
management of central and expanded are different:
For expanded, CP has a time stamp and know exactly how old each page is.
For central storage there only is the reference bit, thus CP can only know
if the page was referenced since the last scan.
re:
http://www.garlic.com/~lynn/2010n.html#39 Central vs. expanded storage
least-recently-used approximation replacement (whether used in the
last scan or not) ... is based on assumption that it is predictor of
probability that the page will be needed in the near future.
as things age past a certain point ... differences in their age (since
last used) becomes less reliable differentiator (as to higher or lower
probability of being used in the near future) ... and some sort of
psuedo-random can actually outperform strict ordering (some of these are
scenarios where LRU devolves to FIFO ... and random performs better
than straight FIFO).
in the 70s, there were a number of places that looked at multiple bits
... effectively one per scan, possibly one hardware bits and one or
more software bits, where RRB becomes more like logical shift instruction.
One of the issues is if it takes too long to do a complete scan ...
then there is little differentiation being made between pages.
Splitting memory into storage and extended storage ... makes regular
storage smaller and therefor the scan goes faster. Having multiple
bits (more history) also tends to scan going faster ... since
the additional history tends to require scan to look at more
pages each time.
Again from the early 70s, another approach is to offset the testing of the
reference bit from resetting the reference bit ... say by 1/2 or 1/4
the number of pages. This gave the name to "clock" in the early 80s
i.e. two "hands" rotating around storage pages ... one resetting and
the other testing ... rather than a single "hand" resetting and
testing simultaneously; while I had done something similar in the late
60s and early 70s ... "clock" was a stanford phd in the early 80s.
At the time of the stanford phd ... there was some academic opposition
to giving a degree in that specific area ... and I was asked to
provide some of my supporting studies from more than a decade
earlier. An old post
http://www.garlic.com/~lynn/2006w.html#46
with copy of communication from the time:
http://www.garlic.com/~lynn/2006w.html#email821019
Besides doing VM, GML, bunch of online & conversational stuff, the
science center had done a lot of work on performance monitoring,
workload & configuration profiling, and stuff that would turn into
capacity planning. This included various kinds of system simulators
and analytical modeling. One of the system simulators included using
instruction/storage traces for simulating variety of page replacement
algorithms ... including "exact LRU" (aka maintaining exact LRU
ordering of *every* page based on each & every reference). In the
early 70s, I had come up with a variation on clock which would always
beat "exact LRU" (coming closer to Belady's "OPT" ... given fore
knowledge of program execution, it would always choose the page for
replacement that resulted in the fewest total page faults).