Transactional Memory. Yaohua Li and Siming Chen. Yaohua Li and Siming Chen Transactional Memory 1 / 41

Size: px
Start display at page:

Download "Transactional Memory. Yaohua Li and Siming Chen. Yaohua Li and Siming Chen Transactional Memory 1 / 41"

Transcription

1 Transactional Memory Yaohua Li and Siming Chen Yaohua Li and Siming Chen Transactional Memory 1 / 41

2 Background Processor hits physical limit on transistor density Cannot simply put more transistors to get more performance Multi-processor and multi-core systems are now normal Full utilization via threaded execution Synchronization is needed to access shared memory Otherwise program state may become corrupted due to interleaving accesses Mutual exclusion locks have been widely used for synchronization Yaohua Li and Siming Chen Transactional Memory 2 / 41

3 Mutual Exclusion Locks Popular for its simplicity and support by general-purpose computers Only the thread owning lock can access shared object Difficult to use and easily causes many problems, if number of locks becomes large Deadlock/Livelock if two or more threads need to obtain multiple locks, they may block each other indefinitely or come into a situation that never exits Priority Inversion if low-priority task obtains a lock, it could block a high-priority task which also wants this lock Convoy if a thread owning a lock is de-scheduled from running, then other threads are prevented from making progress Effort for perfect locking can be huge Race condition can raise, if system run without certain locks, leading to errors and vulnerabilities Yaohua Li and Siming Chen Transactional Memory 3 / 41

4 Transactional Memory What is it? A mechanism to tackle parallel-programming by abstracting concurrent access to shared memory. With TM, Multiple threads can simultaneously try to access shared memory in an atomic way. 1 atomic { Atomic transaction: all the accesses of a thread succeed or none 2 hist[array[i][j]]++; 3 } Code of atomic region that computes the histogram of an array Yaohua Li and Siming Chen Transactional Memory 4 / 41

5 Blocking For highly scalable network servers, non-blocking I/O APIs are desired Server is notified when a channel is ready for more input or output operations Fire an API call, do something else, and check its status later Demand-driven: input and output processing only occur when input data or output space are available Non-blocking synchronization algorithms Does not require mutual exclusion locks to achieve safe concurrency Try to keep threads (CPUs) from busy waiting for locks Transactional memory is one member Yaohua Li and Siming Chen Transactional Memory 5 / 41

6 Transaction Transaction Transaction is composed of one or more revocable, temporary steps, which are committed on the whole with a single atomic command, and no step has visible impact until the commit phase completes. Yaohua Li and Siming Chen Transactional Memory 6 / 41

7 Transaction ACID Properties Atomicity the transaction will complete in its entirety or not at all Consistency all modifications preserve the underlying structure of the object being modified in an consistent way Isolation operations may appear to have executed in isolation, in their entirety. No partial modification is perceived. Durability once committed the changes persist, or once aborted no residue of partial transaction will remain In regard to transactional memory, we are more interested in amoticity and isolation. Yaohua Li and Siming Chen Transactional Memory 7 / 41

8 Comparison Conflict violation of a temporal order, when performing memory access Transactional Memory Optimistic against conflict Abandon work of one of conflicting transactions Mutual Exclusion Lock Pessimistic against conflict Prevent conflicts from happening Since actual conflicts are rare in many programs, the optimistic transactional memory makes more sense. Yaohua Li and Siming Chen Transactional Memory 8 / 41

9 Benefits of Transactional Memory TM provides Higher-level abstraction Better trade-off between scaling and implementation effort Inherently deadlock free since no lock used Failure atomicity all or none Yaohua Li and Siming Chen Transactional Memory 9 / 41

10 Synchronization Levels Hierarchy of synchronization levels within non-blocking algorithms Obstruction-freedom guarantees that a thread operating on a shared data structure will complete, if eventually executed in isolation. It means deadlock will not occur, but no guard against livelock. Lock-freedom denies livelock, i.e. guarantees that all threads of execution will make progress, are lock-free, and all lock-free algorithms are obstruction-free. It does not guarantee that individual threads may not starve. Wait-freedom guarantees that any thread can complete any operation in a finite number of steps, and all wait-free algorithms are also lock-free. Yaohua Li and Siming Chen Transactional Memory 10 / 41

11 Hardware Support for TM No intrinsic support for transactional algorithms in most machines Support instruction for basic atomic operations CompareAndSwap is one such instruction commonly found in modern processors Yaohua Li and Siming Chen Transactional Memory 11 / 41

12 CompareAndSwap CompareAndSwap, CAS Set a memory location to a new value, if it currently contains a specified expected value CompareAndSwap (a:wordaddress, old:word, new:word): Bool if *a = old then *a new return True else return False Executed in one machine instruction, providing atomicity Building block for create arbitrarily complicated non-blocking algorithms Yaohua Li and Siming Chen Transactional Memory 12 / 41

13 More Instructions LoadLinked Load a value from memory and lock it LoadLinked (r :Register, a :WordAddress) r *a Linked(a ) True StoreConditional Store succeeds only if the memory location read in the LoadLinked step has not been modified by some other memory operation StoreConditional (r :Register, a :WordAddress) if Linked(a ) = True then *a r r 1 else r 0 Yaohua Li and Siming Chen Transactional Memory 13 / 41

14 Example CompareAndSwap Obstruction-free double-ended queue implementation. Push and Pop operations from both sides Look into only operations on right side Implemented with CompareAndSwap Yaohua Li and Siming Chen Transactional Memory 14 / 41

15 RightPush Procedure 1 type element = val: valtype; ctr: int 2 RightPush(A, value ) 3 while True 4 do k Oracle(A, right ) 5 prev A k 1 // author cited algorithm wrong here 6 cur A k 7 if prev.val End r cur.val = End r 8 then if k = Max then return Full 10 if CAS(&A k 1, prev, prev.val, prev.ctr + 1 ) 11 then if CAS(&A k,cur, value, cur.ctr + 1 ) 12 then return OK The Oracle procedure guesses where in the queue the left or right end of the queue is, and returns that index. Yaohua Li and Siming Chen Transactional Memory 15 / 41

16 RightPop Procedure 1 type element = val: valtype; ctr: int 2 RightPop(A) 3 while True 4 do k Oracle(A, right ) 5 cur A k 1 6 next A k 7 if cur.val End r next.val = End r 8 then if cur.val = End l A k 1 = cur 9 then return Empty 10 if CAS(&A k, next, End r, next.ctr + 1 ) 11 then if CAS(&A k 1,cur, End r, cur.ctr + 1 ) 12 then return cur.val The Oracle procedure guesses where in the queue the let or right end of the queue is, and returns that index. Yaohua Li and Siming Chen Transactional Memory 16 / 41

17 Implementations Hardware Transactional Memory (HTM) Software Transactional Memory (STM) Hybrid Transactional Memory (HyTM) Hardware-assisted STM (HaSTM) HyTM Supports HTM but falls back on STM transactions when hardware resources are exceeded. HaSTM Combines STM with new architectural support to accelerate parts of the STM s implementation. Yaohua Li and Siming Chen Transactional Memory 17 / 41

18 Hardware transactional memory Minimalist approaches ISA additions Complement the instruction set architecture (ISA) with a small set of new instructions. Cache/Buffer modifications Modify the cache consistency protocols Alternates Require minimal or no ISA support or cache modifications. Yaohua Li and Siming Chen Transactional Memory 18 / 41

19 API design: ISA additions STR/ETR: Start/end transaction TLD/TST: Transactional read/write ABR/VLD: Abort/validation of a transaction ABR Select a victim transaction for aborting under program control VLD Can validate a transaction and catch a conflict early Yaohua Li and Siming Chen Transactional Memory 19 / 41

20 Data versioning and conflicts: cache/buffer modifications Work at the word or cache line level Transactional loads and stores in a separate transactional cache or in conventional data caches with transactional support Keep transactions speculative state in the data cache or in a hardware buffer area Rely on extending cache coherence protocols, such as MESI (modified, exclusive, shared, invalid) to detect conflicts and enforce atomicity Yaohua Li and Siming Chen Transactional Memory 20 / 41

21 One design of cache modifications by Herlihy and Moss Keeps the transactions read set and write set in the data cache Hardware extension: two extra bits needed per cache line Two bits Indicate whether the line is to be discarded on commit (for lines holding unmodified data) or on abort (for speculatively modified lines). Protocol extension: whether the version is to be kept or dropped. Conflict A load has read invalid data and the associated transaction must abort On abort, the write set of the aborting transaction (associated with the tentative store instructions) is dropped On commit, the version of the original values before the store instructions are dropped, and the transactions speculative stores are committed to memory Yaohua Li and Siming Chen Transactional Memory 21 / 41

22 One variant of the design The system keeps the original state in main memory Keeps the speculative state in the data cache One bit added per cache line for this design The bit is set when a transaction accesses the line Upon commit and abort, the bit is cleared On abort, the modified lines with this bit set are also invalidated Yaohua Li and Siming Chen Transactional Memory 22 / 41

23 Software transactional memory First use By Shavit and Touitou in 1995 Basic case Non-nesting transactions that make updates to shared memory within a single multithreaded process Main problems an STM must tackle Must provide separate per-thread views of the heap Must provide a mechanism for detecting and resolving conflicts between transactions Yaohua Li and Siming Chen Transactional Memory 23 / 41

24 STM API design: Managing transactional state Mechanism Allows a transaction to see its own writes as it continues to run and allows memory updates to be discarded if the transaction ultimately aborts Data organization in memory One approach separates transactional data and ordinary data, introducing a distinct memory format for transactional objects; An alternative approach allows data to retain its ordinary structure in memory, and the STM uses separate structures to maintain its own metadata. Object-based STM (OSTM) Uses the object header to track which transactions are currently accessing the object. The programming API provides operations to open an object header, returning a reference to a copy of the objects body for the transaction to use Bartok STM Makes no low-level distinction between ordinary and transactional data Yaohua Li and Siming Chen Transactional Memory 24 / 41

25 OSTM API design o body OpenForReading(tx tx, o header o); o body OpenForWriting(tx tx, o header o); Open-ForWriting Returns a private shadow copy of the object body Open-ForReading only Must not update object bodies Pointer-based data structures Must always add an extra level of indirection by storing references to object headers rather than direct references to object bodies Yaohua Li and Siming Chen Transactional Memory 25 / 41

26 OSTM API design Read/Write set Maintained by the OSTM runtime system Abort Discards any shadow copies that have been created for transaction Commit 1) Atomically checks that no conflicting transaction has updated objects in the read set or the write set 2) Updates the object headers for objects in the write set, thus publishes the private shadow copies as the objects new contents. Yaohua Li and Siming Chen Transactional Memory 26 / 41

27 Bartok STM API design Metadata Holded by STM in separate structures for concurrency control TMW Transactional Metadata Word, mapped by STM from a word s address to manage that data TMW API Includes functions to open the TMWs for the data that it will read from or write to Read/Write API void OpenForReading(tx *tx, tmw *t); void OpenForWriting(tx *tx, tmw *t); word STMRead(tx *tx, word *a); void STMWrite(tx *tx, word *a, word d); Yaohua Li and Siming Chen Transactional Memory 27 / 41

28 Bartok STM API design: Compiler s Translation 1 atomic { 2 hist[index]++; 3 } After compiler s translation 1 atomic { OpenForReading(tr, TMW_FOR(index)); 4 OpenForWriting(tr, TMW_FOR(hist)); 5 int *addr = &hist[stmread(tr, &index)]; 6 STMWrite(tr, addr, STMRead(tr, addr) + 1); } The atomic block itself must be translated into calls to library functions to start and commit transactions and to reexecute the transaction if the commit fails. Yaohua Li and Siming Chen Transactional Memory 28 / 41

29 Bartok STM API implementation Broadly, there are two ways of managing tentative updates. Buffered updates Keeps a private shadow copy of all the memory words it updates. Calls to STMRead must consult the shadow copies so that they will see earlier writes by the same transaction. Hashing can accelerate this look-up (mapping an address to a slot in the current transactions shadow table to avoid searching it). In-place updates STMWrite directly updates the heap so that calls to STMRead will see earlier updates without needing to search a table. In this case, STMWrite must maintain an undo log of all values that it overwrites, so that the transaction can roll back its changes if it aborts. Yaohua Li and Siming Chen Transactional Memory 29 / 41

30 Detecting and resolving conflicts in STM Blocking Objects locking, which acquires locks as a transaction executes and holds them until it commits. (lock in shared-read mode) Disadvantage Scales poorly on multiprocessor hardware because it introduces contention in the memory hierarchy. Nonblocking OSTM performs an atomic multiword update across the header contents of the objects in the read and write sets. It checks that there has been no update to objects in the read set and updates the object headers in the transactions write set to publish the transactions shadow copies. Advantage This design avoids read locks; the transactions read set is validated purely by memory read operations. Disadvantage Complicated in terms of both software engineering and the number of atomic compare-and-swap operations used at runtime. Yaohua Li and Siming Chen Transactional Memory 30 / 41

31 Hybrid approach in detecting and resolving conflicts Hybrid approach Combines optimistic and pessimistic schemes by using versioned mutual-exclusion locks, which support normal mutual-exclusion semantics and provide access to a version number counting the number of times the lock has been acquired and released. The design uses mutual exclusion for pessimistic concurrency control to grant write access to the data the lock protects. The version number allows optimistic concurrency control for read access. That is, a transaction records the version number before it first reads from an object and then, at commit time, checks that the version number is unchanged, meaning that no one has updated the object concurrently with the transaction. Yaohua Li and Siming Chen Transactional Memory 31 / 41

32 Procedure of Hybrid approach 1 write { 2 acquire lock to write the object; 3 update the lock version number; 4 write access; 5 release write lock; 6 } 1 read { 2 record the object version number as v1; 3 read access; 4 record the object version number as v2; 5 if (v1 == v2) { 6 commit; 7 } 8 else 9 abort; 10 } Yaohua Li and Siming Chen Transactional Memory 32 / 41

33 Challenges Open/Closed nesting transactions I/O TM mixed with programming models, OpenMP or MPI Yaohua Li and Siming Chen Transactional Memory 33 / 41

34 Open and closed nesting Closed nesting Either all or none of the transactions in a nested region commit Open nesting When an inner transaction commits, its effects become visible for all threads in the system. Flattening model Includes all nested transactions in the outermost transaction HTM systems must use counters to implement flattening (increment for STR, decrement for ETR, commit when zero) On conflict, must roll back to the outermost transaction Alternate Allow each nested transaction to have its own read and write sets Open-nested transactions increase the programmers burden. Compensating actions Complex and the programmer must have an expert grasp of the codes semantics. Yaohua Li and Siming Chen Transactional Memory 34 / 41

35 Open and closed nesting challenges Hardware complexity for flattening model while limiting concurrency and performance Proposed open-nested transaction increase complexity for programmers (commit/abort handler) Yaohua Li and Siming Chen Transactional Memory 35 / 41

36 Original code without nesting 1 atomic { 2 someprocess(shared_data); 3 work=getwork(workqueue); 4 process(work, shared_data); 5 } 6 7 node *getwork(workqueue_t &workqueue) 8 { 9 node *work; 10 work = workqueue.head; 11 if (work!= NULL) 12 workqueue.head = work->next; 13 return work; 14 } Yaohua Li and Siming Chen Transactional Memory 36 / 41

37 Code with closed-nested transactions 1 atomic { 2 someprocess(shared_data); 3 atomic { 4 work=getwork(workqueue); 5 } 6 process(work, shared_data); 7 } Yaohua Li and Siming Chen Transactional Memory 37 / 41

38 Code with open-nested transactions 1 atomic { 2 someprocess(shared_data); 3 atomic_open { 4 work = getwork(workqueue); 5 commit { 6 free(work); 7 } 8 abort { 9 insertwork(workqueue, work); 10 } 11 } 12 process(work, shared_data); 13 } Commit executes when the outermost atomic block commits, free(work) Abort executes when a surrounding transaction aborts, Yaohua Li and Siming Chen Transactional Memory 38 / 41

39 I/O challenges Example Suppose that inside a transaction, a system call attempts to output a character to the terminal Solution 1 Execute the system call immediately This transaction aborted later? Solution 2 Defer the I/O operation until commit Real-time systems? Solution 3 Try to forbid I/O within transactions Yaohua Li and Siming Chen Transactional Memory 39 / 41

40 Final approach to I/O challenges A final approach to solving the I/O problem is to categorize inputs and outputs according to their abortive properties. Undoable If its effects can be rolled back Challenge Programmers must be aware of types of I/O operations that don t make sense to transparently perform as part of a single atomic transaction, for instance, prompting the user for input and then receiving and acting on the input. Yaohua Li and Siming Chen Transactional Memory 40 / 41

41 Thank You Thank You! Yaohua Li and Siming Chen Transactional Memory 41 / 41

6.852: Distributed Algorithms Fall, Class 20

6.852: Distributed Algorithms Fall, Class 20 6.852: Distributed Algorithms Fall, 2009 Class 20 Today s plan z z z Transactional Memory Reading: Herlihy-Shavit, Chapter 18 Guerraoui, Kapalka, Chapters 1-4 Next: z z z Asynchronous networks vs asynchronous

More information

INTRODUCTION. Hybrid Transactional Memory. Transactional Memory. Problems with Transactional Memory Problems

INTRODUCTION. Hybrid Transactional Memory. Transactional Memory. Problems with Transactional Memory Problems Hybrid Transactional Memory Peter Damron Sun Microsystems peter.damron@sun.com Alexandra Fedorova Harvard University and Sun Microsystems Laboratories fedorova@eecs.harvard.edu Yossi Lev Brown University

More information

Potential violations of Serializability: Example 1

Potential violations of Serializability: Example 1 CSCE 6610:Advanced Computer Architecture Review New Amdahl s law A possible idea for a term project Explore my idea about changing frequency based on serial fraction to maintain fixed energy or keep same

More information

6 Transactional Memory. Robert Mullins

6 Transactional Memory. Robert Mullins 6 Transactional Memory ( MPhil Chip Multiprocessors (ACS Robert Mullins Overview Limitations of lock-based programming Transactional memory Programming with TM ( STM ) Software TM ( HTM ) Hardware TM 2

More information

TRANSACTION MEMORY. Presented by Hussain Sattuwala Ramya Somuri

TRANSACTION MEMORY. Presented by Hussain Sattuwala Ramya Somuri TRANSACTION MEMORY Presented by Hussain Sattuwala Ramya Somuri AGENDA Issues with Lock Free Synchronization Transaction Memory Hardware Transaction Memory Software Transaction Memory Conclusion 1 ISSUES

More information

Transactional Memory. How to do multiple things at once. Benjamin Engel Transactional Memory 1 / 28

Transactional Memory. How to do multiple things at once. Benjamin Engel Transactional Memory 1 / 28 Transactional Memory or How to do multiple things at once Benjamin Engel Transactional Memory 1 / 28 Transactional Memory: Architectural Support for Lock-Free Data Structures M. Herlihy, J. Eliot, and

More information

Lecture 21: Transactional Memory. Topics: Hardware TM basics, different implementations

Lecture 21: Transactional Memory. Topics: Hardware TM basics, different implementations Lecture 21: Transactional Memory Topics: Hardware TM basics, different implementations 1 Transactions New paradigm to simplify programming instead of lock-unlock, use transaction begin-end locks are blocking,

More information

Conflict Detection and Validation Strategies for Software Transactional Memory

Conflict Detection and Validation Strategies for Software Transactional Memory Conflict Detection and Validation Strategies for Software Transactional Memory Michael F. Spear, Virendra J. Marathe, William N. Scherer III, and Michael L. Scott University of Rochester www.cs.rochester.edu/research/synchronization/

More information

Agenda. Designing Transactional Memory Systems. Why not obstruction-free? Why lock-based?

Agenda. Designing Transactional Memory Systems. Why not obstruction-free? Why lock-based? Agenda Designing Transactional Memory Systems Part III: Lock-based STMs Pascal Felber University of Neuchatel Pascal.Felber@unine.ch Part I: Introduction Part II: Obstruction-free STMs Part III: Lock-based

More information

Monitors; Software Transactional Memory

Monitors; Software Transactional Memory Monitors; Software Transactional Memory Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico October 18, 2012 CPD (DEI / IST) Parallel and

More information

Lecture 6: Lazy Transactional Memory. Topics: TM semantics and implementation details of lazy TM

Lecture 6: Lazy Transactional Memory. Topics: TM semantics and implementation details of lazy TM Lecture 6: Lazy Transactional Memory Topics: TM semantics and implementation details of lazy TM 1 Transactions Access to shared variables is encapsulated within transactions the system gives the illusion

More information

Multiprocessor Cache Coherence. Chapter 5. Memory System is Coherent If... From ILP to TLP. Enforcing Cache Coherence. Multiprocessor Types

Multiprocessor Cache Coherence. Chapter 5. Memory System is Coherent If... From ILP to TLP. Enforcing Cache Coherence. Multiprocessor Types Chapter 5 Multiprocessor Cache Coherence Thread-Level Parallelism 1: read 2: read 3: write??? 1 4 From ILP to TLP Memory System is Coherent If... ILP became inefficient in terms of Power consumption Silicon

More information

Lecture: Consistency Models, TM. Topics: consistency models, TM intro (Section 5.6)

Lecture: Consistency Models, TM. Topics: consistency models, TM intro (Section 5.6) Lecture: Consistency Models, TM Topics: consistency models, TM intro (Section 5.6) 1 Coherence Vs. Consistency Recall that coherence guarantees (i) that a write will eventually be seen by other processors,

More information

Transactional Memory: Architectural Support for Lock-Free Data Structures Maurice Herlihy and J. Eliot B. Moss ISCA 93

Transactional Memory: Architectural Support for Lock-Free Data Structures Maurice Herlihy and J. Eliot B. Moss ISCA 93 Transactional Memory: Architectural Support for Lock-Free Data Structures Maurice Herlihy and J. Eliot B. Moss ISCA 93 What are lock-free data structures A shared data structure is lock-free if its operations

More information

Linked Lists: The Role of Locking. Erez Petrank Technion

Linked Lists: The Role of Locking. Erez Petrank Technion Linked Lists: The Role of Locking Erez Petrank Technion Why Data Structures? Concurrent Data Structures are building blocks Used as libraries Construction principles apply broadly This Lecture Designing

More information

Atomic Transac1ons. Atomic Transactions. Q1: What if network fails before deposit? Q2: What if sequence is interrupted by another sequence?

Atomic Transac1ons. Atomic Transactions. Q1: What if network fails before deposit? Q2: What if sequence is interrupted by another sequence? CPSC-4/6: Operang Systems Atomic Transactions The Transaction Model / Primitives Serializability Implementation Serialization Graphs 2-Phase Locking Optimistic Concurrency Control Transactional Memory

More information

Operating Systems. Lecture 4 - Concurrency and Synchronization. Master of Computer Science PUF - Hồ Chí Minh 2016/2017

Operating Systems. Lecture 4 - Concurrency and Synchronization. Master of Computer Science PUF - Hồ Chí Minh 2016/2017 Operating Systems Lecture 4 - Concurrency and Synchronization Adrien Krähenbühl Master of Computer Science PUF - Hồ Chí Minh 2016/2017 Mutual exclusion Hardware solutions Semaphores IPC: Message passing

More information

Chí Cao Minh 28 May 2008

Chí Cao Minh 28 May 2008 Chí Cao Minh 28 May 2008 Uniprocessor systems hitting limits Design complexity overwhelming Power consumption increasing dramatically Instruction-level parallelism exhausted Solution is multiprocessor

More information

Improving the Practicality of Transactional Memory

Improving the Practicality of Transactional Memory Improving the Practicality of Transactional Memory Woongki Baek Electrical Engineering Stanford University Programming Multiprocessors Multiprocessor systems are now everywhere From embedded to datacenter

More information

Lecture 12 Transactional Memory

Lecture 12 Transactional Memory CSCI-UA.0480-010 Special Topics: Multicore Programming Lecture 12 Transactional Memory Christopher Mitchell, Ph.D. cmitchell@cs.nyu.edu http://z80.me Database Background Databases have successfully exploited

More information

Concurrent Preliminaries

Concurrent Preliminaries Concurrent Preliminaries Sagi Katorza Tel Aviv University 09/12/2014 1 Outline Hardware infrastructure Hardware primitives Mutual exclusion Work sharing and termination detection Concurrent data structures

More information

Concurrent & Distributed Systems Supervision Exercises

Concurrent & Distributed Systems Supervision Exercises Concurrent & Distributed Systems Supervision Exercises Stephen Kell Stephen.Kell@cl.cam.ac.uk November 9, 2009 These exercises are intended to cover all the main points of understanding in the lecture

More information

Lock vs. Lock-free Memory Project proposal

Lock vs. Lock-free Memory Project proposal Lock vs. Lock-free Memory Project proposal Fahad Alduraibi Aws Ahmad Eman Elrifaei Electrical and Computer Engineering Southern Illinois University 1. Introduction The CPU performance development history

More information

Lecture 20: Transactional Memory. Parallel Computer Architecture and Programming CMU , Spring 2013

Lecture 20: Transactional Memory. Parallel Computer Architecture and Programming CMU , Spring 2013 Lecture 20: Transactional Memory Parallel Computer Architecture and Programming Slide credit Many of the slides in today s talk are borrowed from Professor Christos Kozyrakis (Stanford University) Raising

More information

Monitors; Software Transactional Memory

Monitors; Software Transactional Memory Monitors; Software Transactional Memory Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico March 17, 2016 CPD (DEI / IST) Parallel and Distributed

More information

Portland State University ECE 588/688. Transactional Memory

Portland State University ECE 588/688. Transactional Memory Portland State University ECE 588/688 Transactional Memory Copyright by Alaa Alameldeen 2018 Issues with Lock Synchronization Priority Inversion A lower-priority thread is preempted while holding a lock

More information

Reminder from last time

Reminder from last time Concurrent systems Lecture 7: Crash recovery, lock-free programming, and transactional memory DrRobert N. M. Watson 1 Reminder from last time History graphs; good (and bad) schedules Isolation vs. strict

More information

Hybrid Transactional Memory

Hybrid Transactional Memory Hybrid Transactional Memory Sanjeev Kumar Michael Chu Christopher J. Hughes Partha Kundu Anthony Nguyen Intel Labs, Santa Clara, CA University of Michigan, Ann Arbor {sanjeev.kumar, christopher.j.hughes,

More information

Lecture 21: Transactional Memory. Topics: consistency model recap, introduction to transactional memory

Lecture 21: Transactional Memory. Topics: consistency model recap, introduction to transactional memory Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory 1 Example Programs Initially, A = B = 0 P1 P2 A = 1 B = 1 if (B == 0) if (A == 0) critical section

More information

Lecture 4: Directory Protocols and TM. Topics: corner cases in directory protocols, lazy TM

Lecture 4: Directory Protocols and TM. Topics: corner cases in directory protocols, lazy TM Lecture 4: Directory Protocols and TM Topics: corner cases in directory protocols, lazy TM 1 Handling Reads When the home receives a read request, it looks up memory (speculative read) and directory in

More information

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) ) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) Goal A Distributed Transaction We want a transaction that involves multiple nodes Review of transactions and their properties

More information

Chapter 5: Process Synchronization. Operating System Concepts 9 th Edition

Chapter 5: Process Synchronization. Operating System Concepts 9 th Edition Chapter 5: Process Synchronization Silberschatz, Galvin and Gagne 2013 Chapter 5: Process Synchronization Background The Critical-Section Problem Peterson s Solution Synchronization Hardware Mutex Locks

More information

Lecture 10: Avoiding Locks

Lecture 10: Avoiding Locks Lecture 10: Avoiding Locks CSC 469H1F Fall 2006 Angela Demke Brown (with thanks to Paul McKenney) Locking: A necessary evil? Locks are an easy to understand solution to critical section problem Protect

More information

NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY. Tim Harris, 17 November 2017

NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY. Tim Harris, 17 November 2017 NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY Tim Harris, 17 November 2017 Lecture 7 Linearizability Lock-free progress properties Hashtables and skip-lists Queues Reducing contention Explicit

More information

Cost of Concurrency in Hybrid Transactional Memory. Trevor Brown (University of Toronto) Srivatsan Ravi (Purdue University)

Cost of Concurrency in Hybrid Transactional Memory. Trevor Brown (University of Toronto) Srivatsan Ravi (Purdue University) Cost of Concurrency in Hybrid Transactional Memory Trevor Brown (University of Toronto) Srivatsan Ravi (Purdue University) 1 Transactional Memory: a history Hardware TM Software TM Hybrid TM 1993 1995-today

More information

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) ) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) Transactions - Definition A transaction is a sequence of data operations with the following properties: * A Atomic All

More information

Lecture: Consistency Models, TM

Lecture: Consistency Models, TM Lecture: Consistency Models, TM Topics: consistency models, TM intro (Section 5.6) No class on Monday (please watch TM videos) Wednesday: TM wrap-up, interconnection networks 1 Coherence Vs. Consistency

More information

AST: scalable synchronization Supervisors guide 2002

AST: scalable synchronization Supervisors guide 2002 AST: scalable synchronization Supervisors guide 00 tim.harris@cl.cam.ac.uk These are some notes about the topics that I intended the questions to draw on. Do let me know if you find the questions unclear

More information

Locking: A necessary evil? Lecture 10: Avoiding Locks. Priority Inversion. Deadlock

Locking: A necessary evil? Lecture 10: Avoiding Locks. Priority Inversion. Deadlock Locking: necessary evil? Lecture 10: voiding Locks CSC 469H1F Fall 2006 ngela Demke Brown (with thanks to Paul McKenney) Locks are an easy to understand solution to critical section problem Protect shared

More information

NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY. Tim Harris, 28 November 2014

NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY. Tim Harris, 28 November 2014 NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY Tim Harris, 28 November 2014 Lecture 8 Problems with locks Atomic blocks and composition Hardware transactional memory Software transactional memory

More information

A Qualitative Survey of Modern Software Transactional Memory Systems

A Qualitative Survey of Modern Software Transactional Memory Systems A Qualitative Survey of Modern Software Transactional Memory Systems Virendra J. Marathe and Michael L. Scott TR 839 Department of Computer Science University of Rochester Rochester, NY 14627-0226 {vmarathe,

More information

Fall 2012 Parallel Computer Architecture Lecture 16: Speculation II. Prof. Onur Mutlu Carnegie Mellon University 10/12/2012

Fall 2012 Parallel Computer Architecture Lecture 16: Speculation II. Prof. Onur Mutlu Carnegie Mellon University 10/12/2012 18-742 Fall 2012 Parallel Computer Architecture Lecture 16: Speculation II Prof. Onur Mutlu Carnegie Mellon University 10/12/2012 Past Due: Review Assignments Was Due: Tuesday, October 9, 11:59pm. Sohi

More information

DBT Tool. DBT Framework

DBT Tool. DBT Framework Thread-Safe Dynamic Binary Translation using Transactional Memory JaeWoong Chung,, Michael Dalton, Hari Kannan, Christos Kozyrakis Computer Systems Laboratory Stanford University http://csl.stanford.edu

More information

Transactional Memory

Transactional Memory Transactional Memory Michał Kapałka EPFL, LPD STiDC 08, 1.XII 2008 Michał Kapałka (EPFL, LPD) Transactional Memory STiDC 08, 1.XII 2008 1 / 25 Introduction How to Deal with Multi-Threading? Locks? Wait-free

More information

Module 6: Process Synchronization. Operating System Concepts with Java 8 th Edition

Module 6: Process Synchronization. Operating System Concepts with Java 8 th Edition Module 6: Process Synchronization 6.1 Silberschatz, Galvin and Gagne 2009 Module 6: Process Synchronization Background The Critical-Section Problem Peterson s Solution Synchronization Hardware Semaphores

More information

Lecture 7: Transactional Memory Intro. Topics: introduction to transactional memory, lazy implementation

Lecture 7: Transactional Memory Intro. Topics: introduction to transactional memory, lazy implementation Lecture 7: Transactional Memory Intro Topics: introduction to transactional memory, lazy implementation 1 Transactions New paradigm to simplify programming instead of lock-unlock, use transaction begin-end

More information

Mutex Locking versus Hardware Transactional Memory: An Experimental Evaluation

Mutex Locking versus Hardware Transactional Memory: An Experimental Evaluation Mutex Locking versus Hardware Transactional Memory: An Experimental Evaluation Thesis Defense Master of Science Sean Moore Advisor: Binoy Ravindran Systems Software Research Group Virginia Tech Multiprocessing

More information

Whatever can go wrong will go wrong. attributed to Edward A. Murphy. Murphy was an optimist. authors of lock-free programs LOCK FREE KERNEL

Whatever can go wrong will go wrong. attributed to Edward A. Murphy. Murphy was an optimist. authors of lock-free programs LOCK FREE KERNEL Whatever can go wrong will go wrong. attributed to Edward A. Murphy Murphy was an optimist. authors of lock-free programs LOCK FREE KERNEL 251 Literature Maurice Herlihy and Nir Shavit. The Art of Multiprocessor

More information

T ransaction Management 4/23/2018 1

T ransaction Management 4/23/2018 1 T ransaction Management 4/23/2018 1 Air-line Reservation 10 available seats vs 15 travel agents. How do you design a robust and fair reservation system? Do not enough resources Fair policy to every body

More information

Part 1: Concepts and Hardware- Based Approaches

Part 1: Concepts and Hardware- Based Approaches Part 1: Concepts and Hardware- Based Approaches CS5204-Operating Systems Introduction Provide support for concurrent activity using transactionstyle semantics without explicit locking Avoids problems with

More information

Lecture: Transactional Memory. Topics: TM implementations

Lecture: Transactional Memory. Topics: TM implementations Lecture: Transactional Memory Topics: TM implementations 1 Summary of TM Benefits As easy to program as coarse-grain locks Performance similar to fine-grain locks Avoids deadlock 2 Design Space Data Versioning

More information

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI Department of Computer Science and Engineering CS6302- DATABASE MANAGEMENT SYSTEMS Anna University 2 & 16 Mark Questions & Answers Year / Semester: II / III

More information

Scalable Software Transactional Memory for Chapel High-Productivity Language

Scalable Software Transactional Memory for Chapel High-Productivity Language Scalable Software Transactional Memory for Chapel High-Productivity Language Srinivas Sridharan and Peter Kogge, U. Notre Dame Brad Chamberlain, Cray Inc Jeffrey Vetter, Future Technologies Group, ORNL

More information

Transactional Memory. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Transactional Memory. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Transactional Memory Companion slides for The by Maurice Herlihy & Nir Shavit Our Vision for the Future In this course, we covered. Best practices New and clever ideas And common-sense observations. 2

More information

CS5460: Operating Systems

CS5460: Operating Systems CS5460: Operating Systems Lecture 9: Implementing Synchronization (Chapter 6) Multiprocessor Memory Models Uniprocessor memory is simple Every load from a location retrieves the last value stored to that

More information

IV. Process Synchronisation

IV. Process Synchronisation IV. Process Synchronisation Operating Systems Stefan Klinger Database & Information Systems Group University of Konstanz Summer Term 2009 Background Multiprogramming Multiple processes are executed asynchronously.

More information

Chapter 6: Process Synchronization. Module 6: Process Synchronization

Chapter 6: Process Synchronization. Module 6: Process Synchronization Chapter 6: Process Synchronization Module 6: Process Synchronization Background The Critical-Section Problem Peterson s Solution Synchronization Hardware Semaphores Classic Problems of Synchronization

More information

Foundation of Database Transaction Processing. Copyright 2012 Pearson Education, Inc.

Foundation of Database Transaction Processing. Copyright 2012 Pearson Education, Inc. Foundation of Database Transaction Processing Copyright 2012 Pearson Education, Inc. Chapter Outline - 17.1 Introduction to Transaction Processing - 17.2 Transaction and System Concepts - 17.3 Desirable

More information

The Common Case Transactional Behavior of Multithreaded Programs

The Common Case Transactional Behavior of Multithreaded Programs The Common Case Transactional Behavior of Multithreaded Programs JaeWoong Chung Hassan Chafi,, Chi Cao Minh, Austen McDonald, Brian D. Carlstrom, Christos Kozyrakis, Kunle Olukotun Computer Systems Lab

More information

Synchronization. CSCI 5103 Operating Systems. Semaphore Usage. Bounded-Buffer Problem With Semaphores. Monitors Other Approaches

Synchronization. CSCI 5103 Operating Systems. Semaphore Usage. Bounded-Buffer Problem With Semaphores. Monitors Other Approaches Synchronization CSCI 5103 Operating Systems Monitors Other Approaches Instructor: Abhishek Chandra 2 3 Semaphore Usage wait(s) Critical section signal(s) Each process must call wait and signal in correct

More information

CS510 Advanced Topics in Concurrency. Jonathan Walpole

CS510 Advanced Topics in Concurrency. Jonathan Walpole CS510 Advanced Topics in Concurrency Jonathan Walpole Threads Cannot Be Implemented as a Library Reasoning About Programs What are the valid outcomes for this program? Is it valid for both r1 and r2 to

More information

G Programming Languages Spring 2010 Lecture 13. Robert Grimm, New York University

G Programming Languages Spring 2010 Lecture 13. Robert Grimm, New York University G22.2110-001 Programming Languages Spring 2010 Lecture 13 Robert Grimm, New York University 1 Review Last week Exceptions 2 Outline Concurrency Discussion of Final Sources for today s lecture: PLP, 12

More information

An Introduction to Parallel Systems

An Introduction to Parallel Systems Lecture 4 - Shared Resource Parallelism University of Bath December 6, 2007 When Week 1 Introduction Who, What, Why, Where, When? Week 2 Data Parallelism and Vector Processors Week 3 Message Passing Systems

More information

Atomic Variables & Nonblocking Synchronization

Atomic Variables & Nonblocking Synchronization Atomic Variables & Nonblocking Synchronization CMSC 433 Fall 2014 Michael Hicks (with some slides due to Rance Cleaveland) A Locking Counter public final class Counter { private long value = 0; public

More information

Whatever can go wrong will go wrong. attributed to Edward A. Murphy. Murphy was an optimist. authors of lock-free programs 3.

Whatever can go wrong will go wrong. attributed to Edward A. Murphy. Murphy was an optimist. authors of lock-free programs 3. Whatever can go wrong will go wrong. attributed to Edward A. Murphy Murphy was an optimist. authors of lock-free programs 3. LOCK FREE KERNEL 309 Literature Maurice Herlihy and Nir Shavit. The Art of Multiprocessor

More information

A Dynamic Instrumentation Approach to Software Transactional Memory. Marek Olszewski

A Dynamic Instrumentation Approach to Software Transactional Memory. Marek Olszewski A Dynamic Instrumentation Approach to Software Transactional Memory by Marek Olszewski A thesis submitted in conformity with the requirements for the degree of Master of Applied Science Graduate Department

More information

Last Class: Synchronization

Last Class: Synchronization Last Class: Synchronization Synchronization primitives are required to ensure that only one thread executes in a critical section at a time. Concurrent programs Low-level atomic operations (hardware) load/store

More information

Open Nesting in Software Transactional Memory. Paper by: Ni et al. Presented by: Matthew McGill

Open Nesting in Software Transactional Memory. Paper by: Ni et al. Presented by: Matthew McGill Open Nesting in Software Transactional Memory Paper by: Ni et al. Presented by: Matthew McGill Transactional Memory Transactional Memory is a concurrent programming abstraction intended to be as scalable

More information

Chapter 5: Process Synchronization. Operating System Concepts Essentials 2 nd Edition

Chapter 5: Process Synchronization. Operating System Concepts Essentials 2 nd Edition Chapter 5: Process Synchronization Silberschatz, Galvin and Gagne 2013 Chapter 5: Process Synchronization Background The Critical-Section Problem Peterson s Solution Synchronization Hardware Mutex Locks

More information

CS 153 Design of Operating Systems Winter 2016

CS 153 Design of Operating Systems Winter 2016 CS 153 Design of Operating Systems Winter 2016 Lecture 7: Synchronization Administrivia Homework 1 Due today by the end of day Hopefully you have started on project 1 by now? Kernel-level threads (preemptable

More information

Transactional Monitors for Concurrent Objects

Transactional Monitors for Concurrent Objects Transactional Monitors for Concurrent Objects Adam Welc, Suresh Jagannathan, and Antony L. Hosking Department of Computer Sciences Purdue University West Lafayette, IN 47906 {welc,suresh,hosking}@cs.purdue.edu

More information

NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY. Tim Harris, 31 October 2012

NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY. Tim Harris, 31 October 2012 NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY Tim Harris, 31 October 2012 Lecture 6 Linearizability Lock-free progress properties Queues Reducing contention Explicit memory management Linearizability

More information

Transactional Memory. Concurrency unlocked Programming. Bingsheng Wang TM Operating Systems

Transactional Memory. Concurrency unlocked Programming. Bingsheng Wang TM Operating Systems Concurrency unlocked Programming Bingsheng Wang TM Operating Systems 1 Outline Background Motivation Database Transaction Transactional Memory History Transactional Memory Example Mechanisms Software Transactional

More information

ABORTING CONFLICTING TRANSACTIONS IN AN STM

ABORTING CONFLICTING TRANSACTIONS IN AN STM Committing ABORTING CONFLICTING TRANSACTIONS IN AN STM PPOPP 09 2/17/2009 Hany Ramadan, Indrajit Roy, Emmett Witchel University of Texas at Austin Maurice Herlihy Brown University TM AND ITS DISCONTENTS

More information

Lock-free Serializable Transactions

Lock-free Serializable Transactions Lock-free Serializable Transactions Jeff Napper jmn@cs.utexas.edu Lorenzo Alvisi lorenzo@cs.utexas.edu Laboratory for Advanced Systems Research Department of Computer Science The University of Texas at

More information

CS 241 Honors Concurrent Data Structures

CS 241 Honors Concurrent Data Structures CS 241 Honors Concurrent Data Structures Bhuvan Venkatesh University of Illinois Urbana Champaign March 27, 2018 CS 241 Course Staff (UIUC) Lock Free Data Structures March 27, 2018 1 / 43 What to go over

More information

Dealing with Issues for Interprocess Communication

Dealing with Issues for Interprocess Communication Dealing with Issues for Interprocess Communication Ref Section 2.3 Tanenbaum 7.1 Overview Processes frequently need to communicate with other processes. In a shell pipe the o/p of one process is passed

More information

A can be implemented as a separate process to which transactions send lock and unlock requests The lock manager replies to a lock request by sending a lock grant messages (or a message asking the transaction

More information

Multiprocessors II: CC-NUMA DSM. CC-NUMA for Large Systems

Multiprocessors II: CC-NUMA DSM. CC-NUMA for Large Systems Multiprocessors II: CC-NUMA DSM DSM cache coherence the hardware stuff Today s topics: what happens when we lose snooping new issues: global vs. local cache line state enter the directory issues of increasing

More information

Synchronization via Transactions

Synchronization via Transactions Synchronization via Transactions 1 Concurrency Quiz If two threads execute this program concurrently, how many different final values of X are there? Initially, X == 0. Thread 1 Thread 2 void increment()

More information

CS5412: TRANSACTIONS (I)

CS5412: TRANSACTIONS (I) 1 CS5412: TRANSACTIONS (I) Lecture XVII Ken Birman Transactions 2 A widely used reliability technology, despite the BASE methodology we use in the first tier Goal for this week: in-depth examination of

More information

Unbounded Transactional Memory

Unbounded Transactional Memory (1) Unbounded Transactional Memory!"#$%&''#()*)+*),#-./'0#(/*)&1+2, #3.*4506#!"#-7/89*75,#!:*.50/#;"#

More information

Using Software Transactional Memory In Interrupt-Driven Systems

Using Software Transactional Memory In Interrupt-Driven Systems Using Software Transactional Memory In Interrupt-Driven Systems Department of Mathematics, Statistics, and Computer Science Marquette University Thesis Defense Introduction Thesis Statement Software transactional

More information

Thread-Local. Lecture 27: Concurrency 3. Dealing with the Rest. Immutable. Whenever possible, don t share resources

Thread-Local. Lecture 27: Concurrency 3. Dealing with the Rest. Immutable. Whenever possible, don t share resources Thread-Local Lecture 27: Concurrency 3 CS 62 Fall 2016 Kim Bruce & Peter Mawhorter Some slides based on those from Dan Grossman, U. of Washington Whenever possible, don t share resources Easier to have

More information

transaction - (another def) - the execution of a program that accesses or changes the contents of the database

transaction - (another def) - the execution of a program that accesses or changes the contents of the database Chapter 19-21 - Transaction Processing Concepts transaction - logical unit of database processing - becomes interesting only with multiprogramming - multiuser database - more than one transaction executing

More information

RCU in the Linux Kernel: One Decade Later

RCU in the Linux Kernel: One Decade Later RCU in the Linux Kernel: One Decade Later by: Paul E. Mckenney, Silas Boyd-Wickizer, Jonathan Walpole Slides by David Kennedy (and sources) RCU Usage in Linux During this same time period, the usage of

More information

Chapter 5. Multiprocessors and Thread-Level Parallelism

Chapter 5. Multiprocessors and Thread-Level Parallelism Computer Architecture A Quantitative Approach, Fifth Edition Chapter 5 Multiprocessors and Thread-Level Parallelism 1 Introduction Thread-Level parallelism Have multiple program counters Uses MIMD model

More information

Today: Synchronization. Recap: Synchronization

Today: Synchronization. Recap: Synchronization Today: Synchronization Synchronization Mutual exclusion Critical sections Example: Too Much Milk Locks Synchronization primitives are required to ensure that only one thread executes in a critical section

More information

Cache Coherence and Atomic Operations in Hardware

Cache Coherence and Atomic Operations in Hardware Cache Coherence and Atomic Operations in Hardware Previously, we introduced multi-core parallelism. Today we ll look at 2 things: 1. Cache coherence 2. Instruction support for synchronization. And some

More information

NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY. Tim Harris, 21 November 2014

NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY. Tim Harris, 21 November 2014 NON-BLOCKING DATA STRUCTURES AND TRANSACTIONAL MEMORY Tim Harris, 21 November 2014 Lecture 7 Linearizability Lock-free progress properties Queues Reducing contention Explicit memory management Linearizability

More information

Implementing Rollback: Copy. 2PL: Rollback. Implementing Rollback: Undo. 8L for Part IB Handout 4. Concurrent Systems. Dr.

Implementing Rollback: Copy. 2PL: Rollback. Implementing Rollback: Undo. 8L for Part IB Handout 4. Concurrent Systems. Dr. Concurrent Systems 8L for Part IB Handout 4 Dr. Steven Hand Implementing Rollback: Undo One strategy is to undo operations, e.g. Keep a log of all operations, in order: O 1, O 2,.. O n On abort, undo changes

More information

CSE 451: Operating Systems Winter Lecture 7 Synchronization. Steve Gribble. Synchronization. Threads cooperate in multithreaded programs

CSE 451: Operating Systems Winter Lecture 7 Synchronization. Steve Gribble. Synchronization. Threads cooperate in multithreaded programs CSE 451: Operating Systems Winter 2005 Lecture 7 Synchronization Steve Gribble Synchronization Threads cooperate in multithreaded programs to share resources, access shared data structures e.g., threads

More information

Some Examples of Conflicts. Transactional Concurrency Control. Serializable Schedules. Transactions: ACID Properties. Isolation and Serializability

Some Examples of Conflicts. Transactional Concurrency Control. Serializable Schedules. Transactions: ACID Properties. Isolation and Serializability ome Examples of onflicts ransactional oncurrency ontrol conflict exists when two transactions access the same item, and at least one of the accesses is a write. 1. lost update problem : transfer $100 from

More information

Mohamed M. Saad & Binoy Ravindran

Mohamed M. Saad & Binoy Ravindran Mohamed M. Saad & Binoy Ravindran VT-MENA Program Electrical & Computer Engineering Department Virginia Polytechnic Institute and State University TRANSACT 11 San Jose, CA An operation (or set of operations)

More information

Non-blocking Array-based Algorithms for Stacks and Queues. Niloufar Shafiei

Non-blocking Array-based Algorithms for Stacks and Queues. Niloufar Shafiei Non-blocking Array-based Algorithms for Stacks and Queues Niloufar Shafiei Outline Introduction Concurrent stacks and queues Contributions New algorithms New algorithms using bounded counter values Correctness

More information

CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable)

CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) CSL373: Lecture 5 Deadlocks (no process runnable) + Scheduling (> 1 process runnable) Past & Present Have looked at two constraints: Mutual exclusion constraint between two events is a requirement that

More information

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference

More information

Transactional Memory. Prof. Hsien-Hsin S. Lee School of Electrical and Computer Engineering Georgia Tech

Transactional Memory. Prof. Hsien-Hsin S. Lee School of Electrical and Computer Engineering Georgia Tech Transactional Memory Prof. Hsien-Hsin S. Lee School of Electrical and Computer Engineering Georgia Tech (Adapted from Stanford TCC group and MIT SuperTech Group) Motivation Uniprocessor Systems Frequency

More information

Chapter 5 Asynchronous Concurrent Execution

Chapter 5 Asynchronous Concurrent Execution Chapter 5 Asynchronous Concurrent Execution Outline 5.1 Introduction 5.2 Mutual Exclusion 5.2.1 Java Multithreading Case Study 5.2.2 Critical Sections 5.2.3 Mutual Exclusion Primitives 5.3 Implementing

More information

Bill Bridge. Oracle Software Architect NVM support for C Applications

Bill Bridge. Oracle Software Architect NVM support for C Applications JANUARY 20, 2015, SAN JOSE, CA Bill Bridge PRESENTATION TITLE GOES HERE Place Speaker Photo Here if Available Oracle Software Architect NVM support for C Applications Overview Oracle has developed a NVM

More information