Now if you're exclusive, your not going to have multiple bit set
here. Cause this basically means that, that
core has a writable copy and we can't have if we want to keep the data coherent
we won't want multiple, we don't want multiple copy writings in the system.
So as you can see here, denoted only one, one here.
And if it's uncached, we don't need to track anything there, we just got, don't
cares. [COUGH] There's one other state here that
I, I have and it's pending. And this usually actually turns into a
couple sub-states there's different ways to track this.
At the directory, these transactions take multiple steps.
You're going to send some data and start transitioning.
Let's say, you want to get a data, data writable.
Well it, that, the directory's going to have to invalidate all the other copies.
It can't do this instantaneously, but we want to provide the appearance of a
atomicity or, or, or that the operations are atomic in some way.
So typically, you'll actually have some sub-states that are shared, that are
stored here, which are something like, oh this cash line is currently transitioning
from, I don't know, U to E. Don't allow some other transaction to
happen to it right now. Just kind of block that.
Another way to do that, the one way is to store it actually in the directory, as a
state bit. Another way is you have some fully
associative structure, a side structure, which just has all of the cache lines
currently in flux. And, the directory's smart enough to know
that if some other request comes in for that line, while it's in flux just to
NACK that request, or negative acknowledge that request and tell the
other cache to retry. So you can do it either way.
but it gets pretty complicated. We're not going to talk about all the
details of that but we'll talk about the high level transitions assuming that they
are somehow topic. So here we're going to look at how MSI.
It fits together with this. But you could actually think about doing
this with Mesi or some other protocol. It's a little bit simpler, emphasize a
little bit simpler so we're going to look at that.
Also the benefit of something like a Mesi protocol is lessened in a directory
because if you pull something in, in the exclusive state, which is unmodified at
the beginning. [COUGH] And someone else wants to get a
read only copy. You're basically going to have to send a
message to that core. And that was inexpensive on a bus,
because it could just see the transaction going across.
And it would just snoop it and would demote from E to shared or something like
that, E to S. But now, it actually turns into actual
work. The directory's going to have to generate
messages. And you're going to have to wait for
responses coming back from a cache which had it in exclusive, so.
[COUGH] full mezies a little bit less common when you stretch grow these
distributed shared memory protocols. Okay, so this is a slide we had before.
This is MSI on a bus. Well things change a little bit when we
go to MSI for directory coherence. And before we go through this, I wanted
to point out, that there is actually two different state machines going on here.
There's one state machine that is happening in the cache controllers, so
actually, in the cache of a respective processor. And then there's a different
state machine which is happening in the directory.
And you'll see that they have different letters here.
This is SU and E versus MS and I. And, and we label these differently on
purpose just to, not, not get totally confused.
And these state machines interact by sending messages between each other, and
as messages flow between the directory and the cache.
There will be both going through different state transitions on this, on
this two tables. Okay, so let's, let's jump into this.
This is the same modified, shared and invalid states that we have in our bus
space snoopy and aside protocol. We didn't change anything here.
And the rules, the rules the same. If you haven't modified, you can do a
right to this and not to send any messages.