# Transactional Memory and Tech Hype Waves

DevFeed: [Transactional Memory and Tech Hype Waves](<https://devfeed.tech/articles/transactional-memory-and-tech-hype-waves-35213.md>)

Original publisher: [Read original article](<https://blog.jessfraz.com/post/transactional-memory-and-tech-hype-waves/>)

Published: 2019-08-14T15:09:26Z

Content type: opinion

Language: en

Sources: [Jessie Frazelle](<https://devfeed.tech/sources/jessie-frazelle.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Deadlock](<https://devfeed.tech/topics/deadlock.md>), [Database](<https://devfeed.tech/topics/database.md>), [intel](<https://devfeed.tech/topics/intel.md>)

Tags: [attacks](<https://devfeed.tech/tags/attacks.md>), [database](<https://devfeed.tech/tags/database.md>), [deadlock](<https://devfeed.tech/tags/deadlock.md>), [intel](<https://devfeed.tech/tags/intel.md>), [side-channel](<https://devfeed.tech/tags/side-channel.md>), [synchronization](<https://devfeed.tech/tags/synchronization.md>)

## AI overview

The article explains transactional memory, including Intel's Transactional Synchronization Extensions (TSX), as a way to avoid deadlocks while potentially introducing livelocks. It compares transactional memory with database transactions and discusses speculative outcomes, TSX abort handlers, and possible side-channel security concerns.

## Source excerpt

At lunch today I learned about Transactional Synchronization Extensions (TSX) which is an implementation of transactional memory. The conversation started as a rant about why transactional memory is bad but then it evolved into how this concept even came to be and how it even got implemented if it's such a terrible idea. What is transactional memory? First let's start by going over what transactional memory is. You might be familiar with a deadlock. A deadlock occurs when a process or thread is waiting for a specific resource, which is also waiting on a different resource that is being held by another waiting process. You can think of this as P1 needs R1 and has R2, while in turn P2 needs R2 and has R1. That is a deadlock. Transactional memory removes the possibility of getting a deadlock and replaces it with what is known as a livelock. A livelock happens when processes are constantly changing with regard to one another but neither of them move forward or progress in anyway. Imagine you are walking down the street while another person is heading towards you. You move to the right to avoid running into them as they also move in that direction to avoid running into you. You both then move to the other side so as to not run into each other. This repeats over and over again with no progress forward since both people are moving in the same direction. That is a livelock. With transactional memory you no longer have deadlocks but livelocks. Why is this? Well, transactional memory works very similarly to database transactions. A transaction is a group of operations that can execute and commit changes as long as there are no conflicts. If there is a conflict, it will start from state zero and try to run again until there are no conflicts. Therefore, until there is a successful commit of a run, the outcome of any operation is speculative. Intel's implementation of TSX behaves in such a way that when a transaction aborts due to a hardware exception, it does not fire typical e