One embodiment of the present invention provides a system that facilitates
efficient transactional execution. During operation, the system executes
a starvation-avoiding transaction for a thread, wherein executing the
starvation-avoiding transaction involves: (1) placing load-marks on cache
lines which are loaded during the starvation-avoiding transaction; (2)
placing store-marks on cache lines which are stored to during the
starvation-avoiding transaction; and (3) writing a timestamp value into
metadata for load-marked and store-marked cache lines. While the thread
is executing the starvation-avoiding transaction, the system prevents
other threads from executing another starvation-avoiding transaction.
Whereby the load-marks and store-marks prevent interfering accesses from
other threads to the cache lines during the starvation-avoiding
transaction.