This calls for modifying both the virtual memory part
as well as the UBC part of the original
system, to handle the needs of the global memory
system. And particular what you notice, is that the
VM and the unified buffer cache, when it wanted
a missing page, it used to go to the
disk. But here what we're going to do is we're
going to make it go to the GMS Because GMS
knows whether a particular page, that is
missing in the address space of a process,
is present in some remote GMS and similarly, if a page is missing from the
file cache, it knows whether that page. Is perhaps in the remote GMS. So that's
why, what we do is, we modify the
virtual memory manager and unified buffer cache manager
to get their calls for getting and putting pages. Get
page is when there is a page fault I need to
get that page. I would go to the disc normally,
but I now, I go to GMS. That GMS worry about
getting it for me. Similarly if a page is missing
in the unified buffer cache, I go to the GMS to
say get me that page for me, and he will
then do the work of finding out whether it is in
remote GMS or if it is not anywhere in the
cluster as we've seen in some of the cases. It
could be under disk, it will get it from the
disk. Notice also writes to disk is unchanged. Originally, whenever
the VM manager decides to write to the disk, it's
because a page is dirty. It writes to the disk.
That part we don't want to mess with, because we
are not affecting the reliability of the system in any way.
Writes remain unchanged. Only when you have a
page fault, you have to get it Get the
page from the disk, you don't go to the disk anymore, but you come to GMS, and
GMS then is integrated into the system so
that it figures out where to get the missing
page from. Remember that the most important thing
that we have to do in implementing this global
LRU at approximation to global LRU. Is
collecting age information. That's pretty tricky. And
the case of file cache is pretty
straightforward, because it is explicit from the process
where it is making regenerate calls, we
can insert code as part of integrating GMS
into this unified buffer cache, to see
what pages are being accessed based on the
region rights that are happening to the
unified buffer cache. Because these calls are explicit
from the application, going into the operating
system and therefore, we can intercept those calls
as part of integrating DMS to collect
age information for the pages that are housed
in the unified buffer cache. VM on the
other hand, is very, very complicated. Because memory
access, that a process does, is happening
in hardware on the CPU. The operating system
does not see the individual memory access that
a user program is making, so how does
GMS collect aid information for the anonymous,
that's why these pages are called anonymous pages.
In this case, the pages are not anonymous
because we know exactly what pages are being
reached in by a particular read or write
by a file system, but the reads and writes
that a user process is making to its virtual
address space are the pages that are anonymous so
far as the operating system is concerned. So, how
does the operating system collect the age information? In
order to do that, the authors of GMS what they did, was to have a daemon part of
the memory manager in the OSF implementation. The daemon's job is
to dump information from the TLB. If you recall, TLB, the translation lookaside
buffer, contains the recent translations that have been done on a particular
node. So the TLB contains information about the recently accessed pages on
a particular processor. Periodically, say every minute, it
dumps the contents of the TLB into a
data structure that the GMS maintains so that
it can use that information in deriving the age
information for all the anonymous pages that are
being handled by the VM. So that is
how GMS collects the age information at every
node. So this is where I meant, the technical
details are very important. Because this idea of how
to gather age information is something that might be
useful if you're implementing a completely different facility. And
similarly, when it comes to the pageout daemon. The pageout
daemon, normally, what it would do is, when it
is throwing out pages. If they are dirty pages, he'll
write it on to the disk. And if it
is clean pages, he can simply discard it. But now,
when it has a clean page, it wants to
discard a clean page, a pageout daemon. We'll give
it to GMS, because GMS will say, well, don't
throw it out. I'll put it into cluster memory
so that it is available later on for retrieval
rather than going to the disk. So this is
how GMS is integrated into this whole picture, interacting
with the Unified Buffer Cache, interacting with the VM Manager,
interacting with the Pageout Daemon and the Free List Maintenance as
well in terms of allocating and freeing frames on every node.