Previous | Next --- Slide 54 of 60
Back to Lecture Thumbnails
kevtan

The tradeoff here is that if you were to map data to transaction records at the granularity of $-lines, then you have to maintain fewer transaction records (which would result in less memory overhead as well as faster conflict dection) but you might introduce false sharing which would incorrectly detect conflicts and abort innocent transactions.

itoen

This feels very similar to the difference between coarse and fine-grained locking when considering the tradeoff between complexity and performance. Here we are considering how granular we want to keep transaction records. The more granular the records, the more performant as there are less likely conflicts when considering smaller regions of memory (down to a single cache line as @kevtan said). The tradeoff is the additional memory needed to maintain this global table of transaction records, even for variables as small as an int.

Please log in to leave a comment.