Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is Software Transactional Memory (STM)?

0
Posted

What is Software Transactional Memory (STM)?

0

A transaction is a sequence of operations that are either completed atomically or that don’t complete and have no effect on the state of the program. Database transactions are heavyweight and carry a load of properties relating to durability (persistence of data once a transaction has been completed) too. STM, on the other hand, is a very lightweight transaction mechanism and, in a good implementation, cache-sensitive so as to achieve high performance and scalability. STM tracks what variables you read from and write to. Changes are not made to the real variables, but instead are stored in a transaction log. Outside of the current transaction, no other parts of the program can see the changes. At the end of the transaction, a commit is attempted. If no other transaction has committed a change to a variable you read or wrote to, your changes are made and the transaction is successful. Otherwise, it fails and has to be repeated again. This has the nice property that at least some thread

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123