So let's introduce some basic terminologies. In GSM, when
we talk about cache, what we mean is physical memory.
We're not talking about the processor caches. We're talking
about physical memory that is the dynamic random access memory
or DRAM for short. Which is the physical memory.
That's what we mean when we use the term cache.
And there is a sense of community to handle page
faults of a particular node. So we'll get to that.
In a minute. And I mentioned that we are
going to use peer memories as a supplement for the
disc. In other words, we can imagine that the
physical memory at every node to be split into two
parts. One part is what we'll call local and
local contains the working set of the currently executing processes
at this node. So this is the stuff that
this node needs in order to keep all the processes
running on this node happy. Now, the global is
similar to a disk. This global part is where
community service comes in, that is, I'm saying that
out of my total physical memory, this is the
part that I need to keep all the processes
happy in my node, and this is the part
that I'm willing to use a space for holding
pages that are swapped out from my fellow citizens
on the local data network. And this split of local
and global is dynamic in response to memory pressure. As
I mentioned earlier, the memory pressure is not something that
stays constant, right? So over time, depending on what's going
on in a particular node, you may have more need
for holding the working set of all your processes. In
which case the local part may keep increasing. On the
other hand, if I go off for lunch, my workstation
is not in use. And in that case, my local part is going to shrink, and I can
house more of my peers swapped out pages in
my global part of the physical memory. So, the
global part is a spare memory that I'm
making available for my peers And local part is
the part that I need for holding the working
set of the currently active process at my node,
and this boundary keeps shifting depending on what's going
on at my node. Pretty simple, normally if all
the processes executing in the entire local area network
are independent of one another, all the pages are private.
You know, I'm running a process, my process, my
pages, and the contents of that pages are private
to my process. On the other hand, you could
also be using the cluster for running an application that
spans multiple nodes of the cluster, in which
case it is possible that a particular page is
shared, and in that case, that page will be
in the local part of multiple peers, because multiple
peers are actively using a page. So, we
have two states for a particular page. It could
be private, or it could be shared. If a
page is in the global part of my physical
memory, then it is guaranteed to be private. Because the
global part is nothing different from a disk. So when I
swap out something, I throw it onto the disk. Similarly,
when I swap out something in GMS, I throw it into
my. Peer memory is the global cache, and therefore what
is in the global cache is always going to be private
copies of pages, whereas what is in the local part can
be private or can be shared, depending on whether that particular
page is being actively shared by more than
one node at a time. Now one important point,
the whole idea of GSM is to serve as
a paging facility. In other words, if you think
about even a uni processor, if it had multiple
processes, sharing a page, the virtual memory manager has
no concern about the coherence about the pages that
are being shared by multiple processes, that's the same
Semantic that is used in GSM also, and
that is coherence. For shared pages, it's outside
GSM, it's an application problem. If there are
multiple copies of the pages residing in the local
parts of multiple peers, maintaining the coherence is
the concern. of the application. That is not, that
is not GSM's problem. Only thing that the
GSM is providing is a service for remote at.
That's important distinction that one has to keep
in mind. In any workshop memory management system, what
you do is when you have to throw out a physical page. When you have to throw out
a page from physical memory. You use an
algorithm, a page replacement algorithm and the page replacement
algorithm that is typically employed in computer systems is
some variant of an LRU or a least recently
used algorithm. GSM also does exactly the
same thing, except it integrates cluster memory management
of the lowest level across the entire
cluster. So the goal in picking a replacement
candidate in GSM is to pick the
globally oldest place for replacement. If, let's say
that the memory pressure in the, system is such that I have to throw out some
page from the cluster memory onto the
disk. The candidate page that I'll choose is
the one that is oldest in the entire cluster. So managing age information is one
of the key technical contributions of GSM,
how to manage the age information so that
we pick. A globally oldest page for replacement
in the community service for handling page faults.