is providing mutual exclusion (ie. via spinlock mechanism) enough to ensure effective implementation of concurrency? Or do we have to explicitly implement some synchronization method as well?
In sum:
Provision of concurrency = effective mutual exclusion implementation
开发者_运维技巧OR
Provision of concurrency = effective mutual exclusion implementation + effective synchronization implementation
?
Thanks.
Concurrency includes the both concept of "mutual exclusion and sycronization". Concurrency is the expression of a state. Mutual exclusion is the expression of a state in Concurrecy. Mutual exclusion is a technique to acquire sycronization in Concurrecy.
All you really need (though other things are often helpful for performance reasons) is mutual exclusion and some mechanism to ensure that operations can't 'move' across the mutual exclusion barriers.
精彩评论