We describe the design and use of the tape mechanism, a new high-level abst
raction of accesses to shared data for software DSMs. Tapes consolidate and
generalize a number of recent protocol optimizations, including update-bas
ed locks and record-replay barriers. Tapes are usually created by "recordin
g" shared accesses. The resulting recordings can be used to anticipate futu
re accesses by tailoring data movement to application semantics. Tapes-base
d mechanisms are layered on top of existing shared-memory protocols, and ar
e largely independent of the underlying memory model. Tapes can also be use
d to emulate the data-movement semantics of several update-based protocol i
mplementations, without altering the underlying protocol implementation. We
have used tapes to create the Tapeworm synchronization library. Tapeworm i
mplements sophisticated record-replay mechanisms across barriers, augments
locks with data-movement semantics, and allows the use of producer-consumer
segments, which move entire modified segments when any portion of the segm
ent is accessed. We show that Tapeworm eliminates 85% of remote misses, red
uces message traffic by 63%, and improves performance by an average of 29%
for our application suite.