Hardware Transactional Memories: A Survey

Hardware Transactional Memories: A Survey

Arsalan Shahid (HITEC University, Pakistan), Maryam Murad (HITEC University, Taxila Cantt, Pakistan), Muhammad Yasir Qadri (University of Essex, UK), Nadia N. Qadri (COMSATS Institute of Information Technology, Pakistan) and Jameel Ahmed (HITEC University, Pakistan)
DOI: 10.4018/978-1-5225-0287-6.ch003
OnDemand PDF Download:
List Price: $37.50


The initiation to have a concept of shared memory in processors has built an opportunity for thread level parallelism. In various applications, synchronization or ordering tools are utilized to have an access to shared data. Traditionally, multithreaded programming models usually suggest a set of low-level primitives, such as locks, to guarantee mutual exclusion. Possession of one or more locks protects access to shared data. But, due to some flaws they become a suboptimal solution. The idea of transactional memory is in research presently as an alternative to locks. Among which, one way is hardware transactional memory. Atomicity is well supported by using transactions in hardware. In this chapter, we have focused on hardware transactional memories and the work done on them so far.
Chapter Preview


Two or more threads when needed to access some mutual data, then a proper mechanism is required to accurately make those executions. There were some issues in using locks to handle such flaws like mutual exclusion and debugging. Therefore, idea of transactional memory was presented (Guerraoui & Romano, 2014). Basic problem in programming multithreads is to manage shared states (Alessandrini, 2015). A great difficulty is faced when multithreaded programs are created because then the main problem that arises is to synchronize them and made them being able to access the mutual data properly (A McDonald, 2009). Programming and computer architecture communities are researching in finding ways to improve parallel techniques of accessing data (Navarro, Hitschfeld-Kahler, & Mateu, 2014). Database systems have successfully exploited parallel hardware for decades. Database is accessed by various operations through transaction even with predictable response.

The idea of transactional memory was first presented by Lomet (Lomet, 1985). He proposed an idea of atomic operations, like the one used in database systems, in programming languages. TM is an attractive feature that access parallel shared data by dealing intellectually with certain issues. TM system is based mainly on three major properties:

  • Atomicity: States that operations within transactions are all finished successfully, or none of them is executed.

  • Consistency: Means that each transaction initiates its operation with a consistent view of the shared data and exits the system in a consistent state after completion.

  • Isolations: Concurrently running transactions are not interrupted by each other (Firoozshahian, 2009).

In TM, programmer defines certain regions that are executed at run-time to detect conflicts automatically. And this is done through read-set and write-set by tracking transactions, and checking reads and writes which are taking place within transactions. For atomicity and isolation, these read sets and write sets are compared with sets of other transactions (A McDonald, 2009).

Complete Chapter List

Search this Book: