A software transactional memory system is described which utilizes
decomposed software transactional memory instructions as well as runtime
optimizations to achieve efficient performance. The decomposed
instructions allow a compiler with knowledge of the instruction semantics
to perform optimizations which would be unavailable on traditional
software transactional memory systems. Additionally, high-level software
transactional memory optimizations are performed such as code movement
around procedure calls, addition of operations to provide strong
atomicity, removal of unnecessary read-to-update upgrades, and removal of
operations for newly-allocated objects. During execution, multi-use
header words for objects are extended to provide for per-object
housekeeping, as well as fast snapshots which illustrate changes to
objects. Additionally, entries to software transactional memory logs are
filtered using an associative table during execution, preventing needless
writes to the logs. Finally a garbage collector with knowledge of the
software transactional memory system compacts software transactional
memory logs during garbage collection.