What are the differences between sequential consistency and quiescent consistency?

前端 未结 2 965
暗喜
暗喜 2021-02-12 12:42

Can anyone explain me the definitions and differences between sequential consistency and quiescent consistency? In the most dumb form possible :|

I did

2条回答
  •  不思量自难忘°
    2021-02-12 13:28

    First you should understand what is program order, it is literally how you expect your program runs in the order of the appearance of instructions.

    But a program order is only for a single thread program, if you have multithreads, then problem comes as the program order may not hold or even not exist as sometimes you cannot tell which thread's method call happens first.

    A quiescent consistency describes a clear program order of all threads' behaviors. that is no overlaps are allowed since it is required a quiescent period between two method calls.

    A sequential consistency allows overlaps, but requires one can find a program order in which all the method calls can be put in a place and still returns correct value and behaves correctly.

提交回复
热议问题