Tweeted twitter.com/StackCompSci/status/712883321597009920
3 edited body
source | link

I'm having trouble in comparing these two memory consistency models.

Essentially for sequential consistency I think of real code like this:

int x, y;

void ThreadA()
{
   x = 20; //Write
   int a = y; //Read
}

void ThreadB()
{
    y = 20;
    int b = x;
}

In a sequential consistency environment it's impossible for both a andor b to not be 20. That is either a = 20a = 20, b = 20b = 20 or x = 20 && y = 20a = 20 && b = 20.

But how does quiescent consistency fit in to this example, and why is it compositional?

I'm having trouble in comparing these two memory consistency models.

Essentially for sequential consistency I think of real code like this:

int x, y;

void ThreadA()
{
   x = 20; //Write
   int a = y; //Read
}

void ThreadB()
{
    y = 20;
    int b = x;
}

In a sequential consistency environment it's impossible for both a and b to not be 20. That is either a = 20, b = 20 or x = 20 && y = 20.

But how does quiescent consistency fit in to this example, and why is it compositional?

I'm having trouble in comparing these two memory consistency models.

Essentially for sequential consistency I think of real code like this:

int x, y;

void ThreadA()
{
   x = 20; //Write
   int a = y; //Read
}

void ThreadB()
{
    y = 20;
    int b = x;
}

In a sequential consistency environment it's impossible for a or b to not be 20. That is either a = 20, b = 20 or a = 20 && b = 20.

But how does quiescent consistency fit in to this example, and why is it compositional?

2 edited tags
| link
1
source | link

Why is quiescent consistency compositional, but sequential consistency is not

I'm having trouble in comparing these two memory consistency models.

Essentially for sequential consistency I think of real code like this:

int x, y;

void ThreadA()
{
   x = 20; //Write
   int a = y; //Read
}

void ThreadB()
{
    y = 20;
    int b = x;
}

In a sequential consistency environment it's impossible for both a and b to not be 20. That is either a = 20, b = 20 or x = 20 && y = 20.

But how does quiescent consistency fit in to this example, and why is it compositional?