Cashmere: Synchronization


Consistency Model

Cashmere employs a release consistent protocol. Therefore, applications must adhere to the data-race-free programing model, which simply stated, means that memory accesses must be protected by locks, flags, or barriers, that are explicitly visible to the runtime system.

Most Cashmere synchronization operations invoke protocol methods responsible for keeping data coherent. A protocol acquire invalidates pages that have been recently modified by other processes, causing the library to automatically fetch an up-to-date copy of an invalidated page on a subsequent access. A protocol release propagates all changes made since the previous protocol acquire to the node responsible for the page (i.e., the home node) and sends invalidations to other sharers of the page.

Locks and Barriers

Upon initialization, Cashmere automatically allocates a large number of locks and barriers that can be referred to via their index.

Flags

Upon initialization, Cashmere automatically allocates a large number of flags that can be referred to via their index and sets each flag to 0 (i.e., a non-released state).
[API] [TOC]