Explore chapters and articles related to this topic
Towards Multicores: Technology and Software Complexity
Published in Marcello Coppola, Miltos D. Grammatikakis, Riccardo Locatelli, Giuseppe Maruccia, Lorenzo Pieralisi, Design of Cost-Efficient Interconnect Processing Units, 2020
Marcello Coppola, Miltos D. Grammatikakis, Riccardo Locatelli, Giuseppe Maruccia, Lorenzo Pieralisi
A promising approach stemming from theoretical research on programming models almost two decades ago is the transactional memory. This approach focuses on coordinating parallelism and providing mutual synchronization in Multicore, multithreaded or highly parallel shared memory systems through a general and flexible way that allows programs to read and modify memory locations atomically as a single operation, similar to a database transaction [143] [134] [144] [146]. If no dependencies are detected between transactions at runtime, then parallel transactions can execute their own load and store operations atomically. If dependencies exist, then certain transactions restart, and corresponding load and store operations are serialized. Since transactions are of arbitrary size and duration, the programmer specifies only where a transaction begins and where it ends, making parallel programming accessible to the average programmer. Software transactional memory supports atomicity by extending programming languages, compilers, and libraries, while hardware transactional memory supports atomicity through architectural concepts, e.g. content-addressable memory.
Optimised memory allocation for less false abortion and better performance in hardware transactional memory
Published in International Journal of Parallel, Emergent and Distributed Systems, 2020
First, Figure 1(a) shows the code using a transactional interface to synchronise accesses from different threads. The interface is simple, when we want any code to be executed as an atomic block, we just wrap the code with atomic (shown in Figure 1(a)). In this case, the two lines in the atomic block will act as they are executed all at once. The atomic block in transactional memory is a higher level of semantics notion and is very easy for programmers to use in concurrent programming.