Previous | Next --- Slide 14 of 79
Back to Lecture Thumbnails
wooloo

Transaction records can be more fine-grained (record per element in object) or more coarse-grained (per-object). As shown on the next slide, tradeoffs between different amounts of granularity include overhead for transaction conflict detection.

tspint

Different transactional memory systems can map transaction records to different pieces of data, depending on how much granularity it is willing to deal with in terms of conflict detection. The more granular it is (e.g. per field in the struct), the more concurrency and fewer false conflicts there will be, but it also introduces overhead. It could also associate a transaction record with an entire record (e.g. a whole struct), but this increases the chance that conflicts happen.

felixw17

This idea of the granularity of locks is really what transactional memory is about. With more coarse locking, the performance benefits from transactions are reduced, since the transactions look more just like a bunch of operations with a lock around them, whereas with more fine-grained locking, there is a greater possibility for performance benefits, but also greater overhead.

Please log in to leave a comment.