Category: 

What Is Transactional Memory?

Article Details
  • Written By: Jean Marie Asta
  • Edited By: Jessica Seminara
  • Last Modified Date: 20 August 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The U.S. Coast Guard led the evacuation of more than 500,000 people from Lower Manhattan on 11 September 2001.  more...

September 27 ,  1940 :  The World War II Axis powers formed with the signing of the Tripartite Pact.  more...

In software, the scheme of transactional memory is a course of action for multithreaded programming which uses transactions that are much like those that a database uses. When two or more threads attempt to access the same data at the same time, many different undesirable situations can result in cases where a program’s outcome depends on the thread access order. Usually, one order is desired and in multithreading, locks are the predominant and simplest way to ensure that only a single thread has access to a specific resource at a time.

This approach to transactional memory contains multiple problems in regards to locks in multithreading. A lock may become permanent if some kind of unanticipated error occurs, and locks can bring about unpredictable issues with concurrency, like deadlock or priority inversion. As a result of locks being very fine-grained, another issue includes the code eventually ending up spending a majority of time between locking, context switching, and unlocking. This is a crucial problem because it can result in the code spending more time on these actions than on doing other, important work in the program. In contrast, coarse-grained locks can cause decreased processing performance and decreased concurrency.

Ad

The problems in transactional memory are addressed by advanced locks, including “lock block” from C#, read-write locks, write barriers, etc. One of the main priorities in regards to transactional memory is to have no locks and no unnecessary lock processing time. It is usually agreed that a data structure that is shared is free of locks if mutual exclusion is not required by its operations. Data structures that are shared and free of locks avoid commonly associated problems with standard locking techniques if they are in systems that are highly concurrent.

The Transactional Memory Coherence and Consistency (TCC) model is a new, proposed model on shared memory. According to the model, atomic transactions are invariably basic units of the following: parallel work, memory coherence, communication, and consistency of memory reference. The TCC model also makes parallel software simpler by eliminating synchronization that uses standards locks or semaphores. Through hardware, TCC also combines every write from each region of transaction occurrence into one packet to atomically broadcast the packet to a memory state that is permanently shared. In addition to simplified coherence hardware, this means there is a reduction in low-dormancy messages needed and a complete elimination of certain, standard coherence protocols.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email