Two Interfaces to the RSTM Transactional Memory System

Size: px
Start display at page:

Download "Two Interfaces to the RSTM Transactional Memory System"

Transcription

1 Two Interfaces to the RSTM Transactional Memory System David Eisenstat May 9, 2006 Abstract Software transactional memory is a promising new paradigm for concurrent programming. We explore the design of the application programmer interface to RSTM [MSH + 06] and propose language extensions to C++ that alleviate some of the unavoidable difficulties with the API. 1 The Transactional Memory Model 1.1 A Scenario Transactional memory was introduced by Herlihy and Moss [HM93] as a way to simplify concurrent programming. Herlihy and Moss proposed a hardware implementation; in a later effort, Herlihy et al. introduced DSTM [HLMWNS03], which provided transactional semantics without special hardware support. The differences between transactions and mutual exclusion, the usual approach to concurrency control, are perhaps best explained with a parable. Alice is a thrifty traveler in New York wishing to visit London. She needs a round-trip airline ticket and a hotel reservation, but she is unwilling to spend more than $2000. Bob is Alice s travel agent. He will negotiate with Carol, who represents an airline, and Dave, who represents a hotel. Carol and Dave will give Bob good deals only if he makes nonrefundable reservations. How should Bob make reservations for Alice? He could call Carol first and ask her how much an airline ticket will cost. He could then call Dave to ask how much a hotel reservation will cost. If the total is less than $2000, he purchases the hotel reservation and calls Carol back to buy the airline ticket. In a sedate market, this strategy will work. Unfortunately for Bob, the London travel market is not at all sedate, and Carol changes her prices constantly in order to maximize profits. If she were to raise her prices after Bob reserves a hotel room from Dave, Bob might find that he is unable to buy an airline ticket without exceeding Alice s $2000 budget. The money he spent on a nonrefundable hotel reservation is effectively lost. How can Bob avoid this problem? In an approach patterned after mutual exclusion, he can try to convince Carol to set aside a ticket and grant him indefinitely the option of buying it at the price she quotes. If Carol is willing to do this, Bob can buy a hotel reservation from Dave, confident that he will be able to purchase a sufficiently inexpensive airline ticket. Since this option amounts to a refundable ticket, however, she will almost certainly not be willing. Moreover, if Eve, Submitted in partial fulfillment of the requirements for a B.S. (Honors) in Computer Science Department of Computer Science, University of Rochester 1

2 a competing travel agent, should make her purchases in the other order, the following scenario becomes a possibility: Carol has only one ticket left, which she promised to Eve, and Dave has only one room left, which he promised to Bob. No one can make any progress! Another approach, which is analogous to transactional memory, is for Bob to interact with Carol and Dave through an arbitrator Trent with whom everyone has signed contracts. When Bob is about to book a travel package, he informs Trent, who starts a file on Bob. When Carol or Dave gives Bob a quote, they inform Trent, who adds the quote to Bob s file. Using Trent, Bob can finalize the quotes on his file at any time, but Carol and Dave can cancel their offers at any time. If Bob tries to make a purchase before he discovers that one of his quotes is no longer valid, Trent will cancel his purchase. Trent s role is to make guarantees about the process of purchasing, namely that a package is purchased either in total or not at all. 1.2 From Agents to Objects In the previous section, Alice and Bob together represent a thread executing a transaction, Carol and Dave represent objects shared between threads, and Trent represents the system providing transactional memory. In most transactional memory systems in which an object is the granularity of access, threads use the following procedure to make updates to shared objects. First, the thread informs the transactional memory system (henceforth abbreviated system) that it would like to begin a transaction. Once the transaction has begun, the thread may ask the system for read-only or read-write access to shared objects. The system either grants access, making a backup copy in case the thread requested read-write access, or it informs the thread that its transaction has been aborted. When the thread is done making updates to shared objects, it tells the system that it would like to commit. The system responds either that the operation was successful, in which case all of the updates become permanent, or that it was not, in which case none of the updates are made. At no time can a thread observe the partial effects of another thread s transaction. Continuing the example from before, we suppose that the available airline tickets are stored in one object, which we call A and the available hotel rooms are stored in object H. When thread B (for Bob) is purchasing a travel package, it requests read-only access on objects A and H to check the prices. If they sum to less than $2000, B upgrades its access to A and H and updates them to reflect a purchase. Suppose thread B opens (successfully requests access to) both A and H for writing and then is preempted. Another thread, say thread D, decides to change the prices of hotel rooms. D begins its own transaction, in which it requests read-write access to H and updates the prices. This is a conflict, since both B and D are trying to update H. The system, then, must prevent at least one of B and D from committing its updates. 1.3 Design Considerations The main requirement of a transactional memory system is to make it appear as though transactions are being run in sequence. This makes it easy to reason about transactional code, since the opportunities for race conditions are very limited. One implementation that satisfies this requirement is to use a single global lock to prevent two threads from performing a transaction at the same time. Although this is a correct implementation, it prevents threads that access disjoint sets 2

3 of objects from running in parallel, even though they will have no adverse effect on one another. For example, Carol and Dave can t change their prices at the same time. Another disadvantage of this implementation is that it is not obstruction-free [HLM03]. Informally, a system is obstruction-free if when all threads but one are stopped, the remaining thread will eventually make progress. Obstruction-free systems have some desirable properties: they cannot deadlock, and high-priority threads can never be blocked by lower-priority threads. With a single global lock, if a thread begins a transaction and is preempted before it can finish, all other threads have to wait for that thread to run again before they can begin their own transactions. Many existing software transactional memory systems, including RSTM, are nonblocking; Saha et al. [SATH + 06] and Ennals [Enn05] argue that it is not necessary for systems to be nonblocking and offers their own systems as evidence of the potential performance gains. One major source of overhead in software transactional memory systems is preventing inconsistencies between different objects. For example, if airline tickets and hotel reservations are always purchased together, objects A and H from the previous example should always register the same number of sales. Consider, however, the scenario where thread B opens A for reading and is preempted; in the meantime, another thread commits a purchase transaction. When thread B resumes and opens H for reading, the number of sales in H won t match the number of sales it observed in A. Although perhaps harmless in this example, some code may be adversely affected. In order to prevent this problem, the system must abort B when it requests access to H. There are two ways to do this in software: the first places the burden on B (B reads invisibly) and the second places the burden on the other thread (B reads visibly). When a thread reads an object invisibly, it must check to make sure that it has the most recent version of that object every time it requests access to another object. This incurs work quadratic in the number of objects read, which can be crushingly large for long transactions. When a thread reads an object visibly, it changes the object header to reflect the fact that it is reading. Other transactions that write the object assume responsibility for notifying the visible reader. Although this approach eliminates the quadratic overhead, it requires each reader to change the object s header. These changes cause contention in the memory subsystem for access to the cache line where the header is stored. Because of this overhead, some systems relax the consistency requirements and attempt to trap and recover from the errors that may possibly result. Others provide a way to release objects that have been read as a way for threads to inform the transactional memory system that their correctness no longer depends on the consistency of the released object. The final issue we consider is memory management. Because of the difficulty and overhead in interrupting threads in software between interactions with the transactional memory system, it is necessary to preserve old versions of objects until it is known that no transaction will use them in the future. For example, if thread B should access object A and another thread should successfully update A, the old version to which B was given access should not be reclaimed until after B finishes its current transaction (such as when it tries to open another object like H). This is exactly the sort of functionality provided by a garbage collector, and indeed many transactional memory systems have been implemented in garbage-collected languages. The rest of this paper is specific to R(S)TM [MSH + 06], short for Rochester (Software) Transactional Memory. It is implemented in C++, which is not usually garbage-collected, and thus its interface has special facilities for memory management. 3

4 //// provided by RSTM void stm::stm_init(); void stm::stm_dest(); BEGIN_TRANSACTION; END_TRANSACTION; template <class T> class Object<T>; /// T inherits from Object<T> template <class T> class Shared<T>; Shared<T>::Shared<T>(T*); const T* Shared<T>::open_RO(); T* Shared<T>::open_RW(); void Shared<T>::release(); Shared<T>* T::shared(); const T* T::open_RO(); T* T::open_RW(); void T::release(); Shared<T>* Shared<T>::shared(); void* stm::tx_alloc(size_t size); void stm::tx_free(void* ptr); //// optionally provided by user T* T::clone(void* ptr); void T::deactivate(); 2 The RSTM API 2.1 Design Considerations Figure 1: Summary of the RSTM API The most important goal in designing the RSTM API (Application Programmer Interface) was to make it as easy as possible to parallelize existing sequential programs. Other goals were to use the C++ type system to eliminate common user mistakes such as accessing an object in a way inconsistent with how it was opened and causing type errors by casting from void* or other generic types to the wrong type. RSTM was implemented by the authors of the paper [MSH + 06] in which it was first described. The author of this paper is responsible for much of the API design. 2.2 Basic Interface The RSTM API is summarized in Figure 1. It depends on the pthreads package to provide concurrent threads of execution. Any thread that makes use of RSTM functionality must first call stm init(). The matching function stm dest() frees all internal resources used by RSTM for the calling thread. Transactions are delimited by the macros BEGIN TRANSACTION and END TRANSACTION. In addition to denoting the enclosed code as transactional, these begin and end a new block respectively. 4

5 int attempts = 0; // declared and initialized previously // Shared<Counter>* mycounter; BEGIN_TRANSACTION; attempts++; // this will count failed transactions mycounter->open_rw()->increment(); // this will not // more transactional code END_TRANSACTION; Figure 2: Roll-back Effects The transaction will be repeated until it is successfully committed. In the event of a failed transaction, modifications to shared objects will be erased but all other changes to memory will be preserved. See Figure 2 for an example of this behavior. The designers of RSTM, which include the author, believe it is desirable because it allows transactions to learn from previous outcomes to improve performance. Shared objects of type T have C++ type Shared<T>. The sole constructor for Shared<T> takes one argument of type T*, a pointer to the object to be shared. RSTM takes responsibility for any object passed to this constructor; the destructor of the Shared<T> will deallocate this object. Once an object has been passed to the constructor, it should never be accessed directly again. In order to use Shared<T> a class T must inherit from Object<T>, which provides methods and member variables used internally by RSTM and duplicates some functionality available by calling the corresponding Shared<T>. Although it may seem strange for a class to inherit from a template class instantiated with its own type, this construction is valid C++, and it allows T to inherit methods with return types T*. Shared<T> has two methods that allow transactional access to the enclosed object; threads may not call these methods outside of a transaction. The open RO() method requests read-only access and returns a const pointer to the most recently committed version of the enclosed object. Because the C++ type system prevents writes to objects through const pointers, all reading threads can and do share a copy of the object. The open RW() method returns a pointer to a fresh copy of the most recently committed version of the object. If the calling transaction later commits, this copy will become the new version. If it does not commit, the copy will be automatically reclaimed. Both of these functions may throw an Aborted exception to indicate that RSTM has aborted the calling transaction. This exception is caught and handled by a catch statement inside the END TRANSACTION macro. Because a Shared<T> and the T it encloses are conceptually the same object, all RSTMprovided methods of Shared<T> are available from T and vice versa. Moreover, T provides (through Object<T>) a shared() method that returns a pointer to the Shared<T> object wrapping it. In writing transactional code, it was convenient to extend the open RO() and open RW() methods to be callable on NULL (in which case they return NULL). It is inconvenient to have two sets of variables, and to keep everything as a Shared<T>* without a compiler that eliminates redundant calls is wasteful. See Figure 3 for an example. This behavior is made possible by non-virtual methods, since C++ does not need to look up the correct method (and in doing so, dereference the object pointer). 5

6 // Shared<ListNode>* node; // node may or not be NULL const ListNode* node_r = node->open_ro(); // node possibly NULL! // node_r is NULL if and only if node is NULL if (node_r && node_r->val == 42) {... Figure 3: Opening NULL Pointers 2.3 A Shared Linked-List The code shown in Figure 4, which performs insertion into a sorted singly-linked list, demonstrates much of the RSTM API. To avoid special case code, the head node does not contain a value. As the list is traversed (variable curr), a pointer to the previous node is kept (variable prev). When the insertion point is found, prev is opened for write and modified to point to a new node, newnode, with value val. newnode, in turn, is made to point to curr, whose shared pointer is recovered with the shared() method. Although it might not be apparent on a first glance, this code makes use of the fact that open RO() can be called on a NULL object, as will happen when val is inserted at the end. 2.4 Advanced Features The release() method, called on an object opened for reading, informs RSTM that the correctness of the transaction no longer depends on that object remaining the same. The potential concurrency of the insertion code in Figure 4 can be greatly improved by uncommenting the line with the release() invocation. In general, it is difficult to support the use of operations with side-effects beyond the STM system in transactions. A typical such operation is prompting for and receiving user input. The reason transactional systems cannot cope is that a transaction that performs such an action is not guaranteed to complete successfully. In the special case of undoing accesses to the memory allocator, there is a straightforward solution. The tx alloc() and tx free() methods work like regular malloc() and free() except when they are called from inside a transaction. In that case, tx alloc() will ensure that any allocated memory will be freed if the transaction aborts. Similarly, tx free() waits until the transaction commits actually to perform the free and does nothing otherwise. The extent of an object intended by the programmer may include more space than C++ would automatically allocate for that object. For example, the implementor of a hash table that stores its buckets as linked lists might want the granularity of access to be entire buckets, not just the head node. To accommodate this usage, RSTM uses the clone() method of T to make a copy of the object; by default, this method is inherited from Object<T> and uses the copy constructor. Programmers can override this method to return a deep copy of the object (i.e., a copy that shares nothing with other copies). One of the consequences of a transactional programming model is that there will often be multiple contemporary copies of an object. Worse, these objects may have overlapping lifespans. 6

7 class ListNode : Object<ListNode> { public: int val; Shared<ListNode>* next; ; void insert (Shared<ListNode>* prehead, int val) { BEGIN_TRANSACTION; // find the insertion point const ListNode* prev = prehead->open_ro(); const ListNode* curr = prev->next->open_ro(); while (curr!= NULL && curr->val < val) { // can release here with // prev->release(); prev = curr; curr = prev->next->open_ro(); // insert val ListNode* newnode = new ListNode(); newnode->val = val; newnode->next = curr->shared(); prev->open_rw()->next = new Shared<ListNode>(newNode); END_TRANSACTION; Figure 4: Insertion into a Linked List 7

8 To provide flexibility, RSTM will not call the destructor of an object when there is another clone still active. Instead, the deactivate() method will be called. Programmers who want to specify custom behavior for deactivation (such as deallocating extra storage allocated during a custom clone() call) should override this method. 2.5 Interfaces to Other STM Systems The first STM system that allowed transactions to access dynamically determined memory locations was DSTM [HLMWNS03], implemented in Java. DSTM and its descendant ASTM [MSS05] share the same interface. The basic interface to RSTM owes much to DSTM, but it makes heavy use of the expressive C++ type system (primarily templates and const pointers) to avoid casts and detect many more problems at compile-time. DSTM, by contrast, requires the programmer to cast values of type Object to their correct type. FSTM [Fra03], implemented in C, suffers some of the same type-safety drawbacks as DSTM, as it uses void pointers the way DSTM uses type Object. Moreover, the API call to begin a transaction returns an opaque transaction handle that must be passed as a second parameter to open calls. There are some arguments for making the API work this way; it prevents programmers from performing transactional operations outside of transactions and gives more flexibility in binding transactions to threads. The big drawback, however, is that programmers must ensure that transaction handle is available wherever it is needed. Moreover, having one transaction per thread does not seem to be a limitation in practice. By contrast, STM Haskell [HHMPJ05] is very type-safe, making use of Haskell s type system to ensure that transactions not only cannot have type errors but also cannot perform operations that have side-effects outside of the STM system. SXM, written in C#, incorporates some ideas from STM Haskell. The novel feature of SXM is that it makes use of runtime reflection to open objects automatically. Although this is undeniably convenient, the C# runtime does not currently detect and remove redundant open calls, which imposes a performance penalty. 3 Language Support 3.1 Problems with the API As it demonstrates the RSTM API, Figure 4 also highlights some shortcomings of that API. Perhaps the biggest shortcoming, common to all of the systems in this class, is that programmers are required to split their code into transactions and annotate shared data. In the author s experience of parallelizing micro-benchmarks of a few hundred lines or less, this has been relatively straightforward; but it seems likely that larger programs will require a disproportionately larger amount of effort. This is a hard problem that we do not address here. There are, however, some shortcomings that are more easily addressed. First, every access to shared objects has to be made explicit with an open call. The alternative is to provide an implicit conversion, in which case neither the programmer nor many compilers, absent modifications, can eliminate redundant open calls. Second, programmers often have to annotate object methods as const when applicable, since open RO() returns a const pointer. Although these annotations are desirable even in sequential code, they are frequently omitted in practice. A better solution would be to delay opening the object on which a method is called, but it seems impossible to do this automatically in C++. Third, programmers are occasionally required to convert a T* to 8

9 a Shared<T>*. In theory, this could also be solved by providing an implicit conversion, but in practice gcc (and possibly other compilers) require explicit typing information to resolve conflicts such as when a T* is used as a boolean value and the compiler cannot determine which conversion to bool to use (even though it doesn t matter). 3.2 A Small Extension to C++ In this spirit, we propose a small language extension to C++. There are three new keywords: shared, atomic, and release. The shared keyword is syntactic sugar for the Shared<T> template type. Thus type shared T* becomes type Shared<T>*. It also informs the compiler that the special implicit conversion rules described below are to be applied. The old constructor for Shared<T> is replaced by a constructor for shared T that allocates a T. The syntax is shared T(...), where... denotes the arguments of the T constructor. This constructor eliminates a safety problem with the old one that was tolerated for usability reasons: there is no way in plain C++ to provide convenient access to all of the constructors for a given class. The atomic keyword is used to specify that the following block be executed transactionally. It replaces the BEGIN TRANSACTION and END TRANSACTION macros. As with the macros, the contents of an atomic block are performed repeatedly until success. The (existing) keyword break may be used to exit an atomic block, and the keyword continue restarts the transaction. To eliminate the need for complicated inter-procedural analysis, functions called from an atomic block are not automatically considered to be in an atomic context. These functions must have their own atomic block. It is permissible to nest atomic blocks. The release keyword takes the place of the old release() method. The promotion rules are simple and work as follows. Inside of an atomic block, open calls are inserted automatically when a term of type shared T appears where a term of type const T or T is needed, Outside of an atomic block, this raises a semantic error. No equivalent of the shared() call is provided. The linked list example, revised to use the language extension, is shown in Figure 5. After compiling away the language extensions as a source-to-source compiler would, the result is what is shown in Figure 6. Compared with the code in Figure 4, the Figure 6 code makes a redundant open call every time through the while loop. It would be a straightforward task, however, to adapt the common subexpression elimination phase of a compiler to remove redundant open calls, since within a given transaction, repeated open calls do not have any effect 1. The author has built part of a source-to-source compiler for a subset of C++ with the above extensions. The proposed extensions are particularly amenable to a source-to-source approach because aside from code improvement, all necessary adjustments to the source can be made locally on the basis of typing information. References [Enn05] Robert Ennals. Software transactional memory should not be obstruction free. rennals/notlockfree.pdf, [Fra03] Keir Fraser. Practical lock freedom. PhD thesis, Cambridge University Computer Laboratory, Also available as Technical Report UCAM-CL-TR Of course, if an object is opened, released, and then accessed again, it must be reopened. 9

10 [HHMPJ05] Tim Harris, Maurice Herlihy, Simon Marlow, and Simon Peyton-Jones. Composable memory transactions. In Proceedings of the ACM Symposium on Principles and Practice of Parallel Programming, to appear, June [HLM03] Maurice Herlihy, Victor Luchangco, and Mark Moir. Obstruction-free synchronization: Double-ended queues as an example. In Proceedings of the 23rd IEEE International Conference on Distributed Computing Systems, May [HLMWNS03] Maurice Herlihy, Victor Luchangco, Mark Moir, and III William N. Scherer. Software transactional memory for dynamic-sized data structures. In PODC 03: Proceedings of the twenty-second annual symposium on Principles of distributed computing, pages , New York, NY, USA, ACM Press. [HM93] [MSH + 06] [MSS05] [SATH + 06] Maurice Herlihy and J. Eliot B. Moss. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the 20th International Symposium on Computer Architecture, pages IEEE Computer Society, May Virendra J. Marathe, Michael F Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William N. Scherer III, and Michael L. Scott. Lowering the overhead of nonblocking software transactional memory. Technical Report TR893, University of Rochester, Computer Science Department, March Virendra J. Marathe, William N. Scherer III, and Michael L. Scott. Adaptive software transactional memory. In Proceedings of the 19th International Symposium on Distributed Computing, Cracow, Poland, September Bratin Saha, Ali-Reza Adl-Tabatabai, Richard L. Hudson, Chi Cao Minh, and Benjamin Hertzberg. McRT-STM: a high performance software transactional memory system for a multi-core runtime. In Proceedings of the 11th ACM SIGPLAN symposium on Principles and Practice of Parallel Programming, pages , New York, NY, USA, ACM Press. 10

11 class ListNode { public: int val; shared ListNode* next; ; void insert (shared ListNode* prehead, int val) { atomic { // find the insertion point shared ListNode* prev = prehead; shared ListNode* curr = prev->next; while (curr!= NULL && curr->val < val) { release prev; prev = curr; curr = prev->next; // insert val shared ListNode* newnode = new shared ListNode(); newnode->val = val; newnode->next = curr; prev->next = newnode; Figure 5: Insertion into a Linked List in C++ with Language Extensions 11

12 class ListNode : Object<ListNode> { public: int val; Shared<ListNode>* next; ; void insert (Shared<ListNode>* prehead, int val) { BEGIN_TRANSACTION; // find the insertion point Shared<ListNode>* prev = prehead; Shared<ListNode>* curr = prev->open_ro()->next; while (curr!= NULL && curr->open_ro()->val < val) { prev->release(); prev = curr; curr = prev->open_ro()->next; // and here // insert val Shared<ListNode>* newnode = new Shared<ListNode>(); newnode->open_rw()->val = val; newnode->open_rw()->next = curr; prev->open_rw()->next = newnode; END_TRANSACTION; // open here Figure 6: Linked List Insertion After Source-to-Source Transformation 12

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

Lowering the Overhead of Nonblocking Software Transactional Memory

Lowering the Overhead of Nonblocking Software Transactional Memory Lowering the Overhead of Nonblocking Software Transactional Memory Virendra J. Marathe Michael F. Spear Christopher Heriot Athul Acharya David Eisenstat William N. Scherer III Michael L. Scott Background

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

Lowering the Overhead of Nonblocking Software Transactional Memory

Lowering the Overhead of Nonblocking Software Transactional Memory Lowering the Overhead of Nonblocking Software Transactional Memory Virendra J. Marathe, Michael F. Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William N. Scherer III, and Michael L. Scott

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

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

Software Transactional Memory for Dynamic-sized Data Structures

Software Transactional Memory for Dynamic-sized Data Structures Software Transactional Memory for Dynamic-sized Structures Maurice Herlihy, Victor Luchango, Mark Moir, William N. Scherer III Presented by: Irina Botan Outline Introduction Dynamic Software Transactional

More information

Snapshots and Software Transactional Memory

Snapshots and Software Transactional Memory Snapshots and Software Transactional Memory Christopher Cole Northrop Grumman Corporation chris.cole@ngc.com Maurice Herlihy Brown University Computer Science Department herlihy@cs.brown.edu. ABSTRACT

More information

Implementing Atomic Section by Using Hybrid Concurrent Control

Implementing Atomic Section by Using Hybrid Concurrent Control 2007 IFIP International Conference on Network and Parallel Computing - Workshops Implementing Atomic Section by Using Hybrid Concurrent Control Lei Zhao, Yu Zhang Department of Computer Science & Technology

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

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

Snapshots and Software Transactional Memory

Snapshots and Software Transactional Memory Snapshots and Software Transactional Memory Christopher Cole Northrop Grumman Corporation Maurice Herlihy Brown University Computer Science Department Abstract One way that software transactional memory

More information

False Conflict Reduction in the Swiss Transactional Memory (SwissTM) System

False Conflict Reduction in the Swiss Transactional Memory (SwissTM) System False Conflict Reduction in the Swiss Transactional Memory (SwissTM) System Aravind Natarajan Department of Computer Engineering The University of Texas at Dallas Richardson, TX - 75080, USA Email: aravindn@utdallas.edu

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

COMP3151/9151 Foundations of Concurrency Lecture 8

COMP3151/9151 Foundations of Concurrency Lecture 8 1 COMP3151/9151 Foundations of Concurrency Lecture 8 Transactional Memory Liam O Connor CSE, UNSW (and data61) 8 Sept 2017 2 The Problem with Locks Problem Write a procedure to transfer money from one

More information

Towards a Software Transactional Memory for Graphics Processors

Towards a Software Transactional Memory for Graphics Processors Eurographics Symposium on Parallel Graphics and Visualization (21) J. Ahrens, K. Debattista, and R. Pajarola (Editors) Towards a Software Transactional Memory for Graphics Processors Daniel Cederman, Philippas

More information

Hazard Pointers. Safe Resource Reclamation for Optimistic Concurrency

Hazard Pointers. Safe Resource Reclamation for Optimistic Concurrency Document Number: P0233R3 Date: 2017-02-06 Reply-to: maged.michael@acm.org, michael@codeplay.com Authors: Maged M. Michael, Michael Wong, Paul McKenney, Arthur O'Dwyer, David Hollman Project: Programming

More information

Parallelizing SPECjbb2000 with Transactional Memory

Parallelizing SPECjbb2000 with Transactional Memory Parallelizing SPECjbb2000 with Transactional Memory JaeWoong Chung, Chi Cao Minh, Brian D. Carlstrom, Christos Kozyrakis Computer Systems Laboratory Stanford University {jwchung, caominh, bdc, kozyraki}@stanford.edu

More information

Simon Peyton Jones (Microsoft Research) Tokyo Haskell Users Group April 2010

Simon Peyton Jones (Microsoft Research) Tokyo Haskell Users Group April 2010 Simon Peyton Jones (Microsoft Research) Tokyo Haskell Users Group April 2010 Geeks Practitioners 1,000,000 10,000 100 1 The quick death 1yr 5yr 10yr 15yr Geeks Practitioners 1,000,000 10,000 100 The slow

More information

Parallel access to linked data structures

Parallel access to linked data structures Parallel access to linked data structures [Solihin Ch. 5] Answer the questions below. Name some linked data structures. What operations can be performed on all of these structures? Why is it hard to parallelize

More information

arxiv: v1 [cs.dc] 13 Aug 2013

arxiv: v1 [cs.dc] 13 Aug 2013 Opacity of Memory Management in Software Transactional Memory Holger Machens and Volker Turau Institute of Telematics Hamburg University of Technology {machens,turau}@tuhh.de http://www.ti5.tuhh.de arxiv:1308.2881v1

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

Software Transactional Memory Should Not Be Obstruction-Free

Software Transactional Memory Should Not Be Obstruction-Free Software Transactional Memory Should Not Be Obstruction-Free Robert Ennals IRC-TR-06-052 INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL

More information

McRT-STM: A High Performance Software Transactional Memory System for a Multi- Core Runtime

McRT-STM: A High Performance Software Transactional Memory System for a Multi- Core Runtime McRT-STM: A High Performance Software Transactional Memory System for a Multi- Core Runtime B. Saha, A-R. Adl- Tabatabai, R. Hudson, C.C. Minh, B. Hertzberg PPoPP 2006 Introductory TM Sales Pitch Two legs

More information

Draft Specification of Transactional Language Constructs for C++

Draft Specification of Transactional Language Constructs for C++ Draft Specification of Transactional Language Constructs for C++ Version: 1.1 February, Transactional Memory Specification Drafting Group Editors: Ali-Reza Adl-Tabatabai, Tatiana Shpeisman, and Justin

More information

Interprocess Communication By: Kaushik Vaghani

Interprocess Communication By: Kaushik Vaghani Interprocess Communication By: Kaushik Vaghani Background Race Condition: A situation where several processes access and manipulate the same data concurrently and the outcome of execution depends on the

More information

Summary: Issues / Open Questions:

Summary: Issues / Open Questions: Summary: The paper introduces Transitional Locking II (TL2), a Software Transactional Memory (STM) algorithm, which tries to overcomes most of the safety and performance issues of former STM implementations.

More information

MultiThreading 07/01/2013. Session objectives. Introduction. Introduction. Advanced Java Programming Course

MultiThreading 07/01/2013. Session objectives. Introduction. Introduction. Advanced Java Programming Course Advanced Java Programming Course MultiThreading By Võ Văn Hải Faculty of Information Technologies Industrial University of Ho Chi Minh City Session objectives Introduction Creating thread Thread class

More information

Advanced Java Programming Course. MultiThreading. By Võ Văn Hải Faculty of Information Technologies Industrial University of Ho Chi Minh City

Advanced Java Programming Course. MultiThreading. By Võ Văn Hải Faculty of Information Technologies Industrial University of Ho Chi Minh City Advanced Java Programming Course MultiThreading By Võ Văn Hải Faculty of Information Technologies Industrial University of Ho Chi Minh City Session objectives Introduction Creating thread Thread class

More information

Relaxing Concurrency Control in Transactional Memory. Utku Aydonat

Relaxing Concurrency Control in Transactional Memory. Utku Aydonat Relaxing Concurrency Control in Transactional Memory by Utku Aydonat A thesis submitted in conformity with the requirements for the degree of Doctor of Philosophy Graduate Department of The Edward S. Rogers

More information

Design Tradeoffs in Modern Software Transactional Memory Systems

Design Tradeoffs in Modern Software Transactional Memory Systems Design Tradeoffs in Modern Software al Memory Systems Virendra J. Marathe, William N. Scherer III, and Michael L. Scott Department of Computer Science University of Rochester Rochester, NY 14627-226 {vmarathe,

More information

A Relativistic Enhancement to Software Transactional Memory

A Relativistic Enhancement to Software Transactional Memory A Relativistic Enhancement to Software Transactional Memory Philip W. Howard Portland State University Jonathan Walpole Portland State University Abstract Relativistic Programming is a technique that allows

More information

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

Cigarette-Smokers Problem with STM

Cigarette-Smokers Problem with STM Rup Kamal, Ryan Saptarshi Ray, Utpal Kumar Ray & Parama Bhaumik Department of Information Technology, Jadavpur University Kolkata, India Abstract - The past few years have marked the start of a historic

More information

LOCK-FREE DINING PHILOSOPHER

LOCK-FREE DINING PHILOSOPHER LOCK-FREE DINING PHILOSOPHER VENKATAKASH RAJ RAOJILLELAMUDI 1, SOURAV MUKHERJEE 2, RYAN SAPTARSHI RAY 3, UTPAL KUMAR RAY 4 Department of Information Technology, Jadavpur University, Kolkata, India 1,2,

More information

Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 20 Concurrency Control Part -1 Foundations for concurrency

More information

Evaluating Contention Management Using Discrete Event Simulation

Evaluating Contention Management Using Discrete Event Simulation Evaluating Contention Management Using Discrete Event Simulation Brian Demsky Alokika Dash Department of Electrical Engineering and Computer Science University of California, Irvine Irvine, CA 92697 {bdemsky,adash}@uci.edu

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

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

Learning from Bad Examples. CSCI 5828: Foundations of Software Engineering Lecture 25 11/18/2014

Learning from Bad Examples. CSCI 5828: Foundations of Software Engineering Lecture 25 11/18/2014 Learning from Bad Examples CSCI 5828: Foundations of Software Engineering Lecture 25 11/18/2014 1 Goals Demonstrate techniques to design for shared mutability Build on an example where multiple threads

More information

What is the Race Condition? And what is its solution? What is a critical section? And what is the critical section problem?

What is the Race Condition? And what is its solution? What is a critical section? And what is the critical section problem? What is the Race Condition? And what is its solution? Race Condition: Where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular

More information

Proposed Wording for Concurrent Data Structures: Hazard Pointer and Read Copy Update (RCU)

Proposed Wording for Concurrent Data Structures: Hazard Pointer and Read Copy Update (RCU) Document number: D0566R1 Date: 20170619 (pre Toronto) Project: Programming Language C++, WG21, SG1,SG14, LEWG, LWG Authors: Michael Wong, Maged M. Michael, Paul McKenney, Geoffrey Romer, Andrew Hunter

More information

Exceptions and Transactions in C++

Exceptions and Transactions in C++ Exceptions and Transactions in C++ Ali-Reza Adl-Tabatabai 2 Victor Luchangco 3 Virendra J. Marathe 3 Mark Moir 3 Ravi Narayanaswamy 2 Yang Ni 2 Dan Nussbaum 3 Xinmin Tian 2 Adam Welc 2 Peng Wu 1 1 IBM

More information

Atomic Transactions in Cilk

Atomic Transactions in Cilk Atomic Transactions in Jim Sukha 12-13-03 Contents 1 Introduction 2 1.1 Determinacy Races in Multi-Threaded Programs......................... 2 1.2 Atomicity through Transactions...................................

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

CSE 410 Final Exam 6/09/09. Suppose we have a memory and a direct-mapped cache with the following characteristics.

CSE 410 Final Exam 6/09/09. Suppose we have a memory and a direct-mapped cache with the following characteristics. Question 1. (10 points) (Caches) Suppose we have a memory and a direct-mapped cache with the following characteristics. Memory is byte addressable Memory addresses are 16 bits (i.e., the total memory size

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Composable Shared Memory Transactions Lecture 20-2

Composable Shared Memory Transactions Lecture 20-2 Composable Shared Memory Transactions Lecture 20-2 April 3, 2008 This was actually the 21st lecture of the class, but I messed up the naming of subsequent notes files so I ll just call this one 20-2. This

More information

Permissiveness in Transactional Memories

Permissiveness in Transactional Memories Permissiveness in Transactional Memories Rachid Guerraoui, Thomas A. Henzinger, and Vasu Singh EPFL, Switzerland Abstract. We introduce the notion of permissiveness in transactional memories (TM). Intuitively,

More information

Improving STM Performance with Transactional Structs 1

Improving STM Performance with Transactional Structs 1 Improving STM Performance with Transactional Structs 1 Ryan Yates and Michael L. Scott University of Rochester IFL, 8-31-2016 1 This work was funded in part by the National Science Foundation under grants

More information

Snapshots and software transactional memory

Snapshots and software transactional memory Science of Computer Programming 58 (2005) 310 324 www.elsevier.com/locate/scico Snapshots and software transactional memory Christopher Cole a,,maurice Herlihy b a Northrop Grumman Mission Systems, 88

More information

Commit Phase in Timestamp-based STM

Commit Phase in Timestamp-based STM Commit Phase in Timestamp-based STM Rui Zhang Dept. of Computer Science Rice University Houston, TX 77005, USA ruizhang@rice.edu Zoran Budimlić Dept. of Computer Science Rice University Houston, TX 77005,

More information

Wrapping a complex C++ library for Eiffel. FINAL REPORT July 1 st, 2005

Wrapping a complex C++ library for Eiffel. FINAL REPORT July 1 st, 2005 Wrapping a complex C++ library for Eiffel FINAL REPORT July 1 st, 2005 Semester project Student: Supervising Assistant: Supervising Professor: Simon Reinhard simonrei@student.ethz.ch Bernd Schoeller Bertrand

More information

Real-Time and Concurrent Programming Lecture 4 (F4): Monitors: synchronized, wait and notify

Real-Time and Concurrent Programming Lecture 4 (F4): Monitors: synchronized, wait and notify http://cs.lth.se/eda040 Real-Time and Concurrent Programming Lecture 4 (F4): Monitors: synchronized, wait and notify Klas Nilsson 2016-09-20 http://cs.lth.se/eda040 F4: Monitors: synchronized, wait and

More information

Intro to Transactions

Intro to Transactions Reading Material CompSci 516 Database Systems Lecture 14 Intro to Transactions [RG] Chapter 16.1-16.3, 16.4.1 17.1-17.4 17.5.1, 17.5.3 Instructor: Sudeepa Roy Acknowledgement: The following slides have

More information

(Pessimistic) Timestamp Ordering. Rules for read and write Operations. Read Operations and Timestamps. Write Operations and Timestamps

(Pessimistic) Timestamp Ordering. Rules for read and write Operations. Read Operations and Timestamps. Write Operations and Timestamps (Pessimistic) stamp Ordering Another approach to concurrency control: Assign a timestamp ts(t) to transaction T at the moment it starts Using Lamport's timestamps: total order is given. In distributed

More information

D Programming Language

D Programming Language Group 14 Muazam Ali Anil Ozdemir D Programming Language Introduction and Why D? It doesn t come with a religion this is written somewhere along the overview of D programming language. If you actually take

More information

Design and Implementation of Transactions in a Column-Oriented In-Memory Database System

Design and Implementation of Transactions in a Column-Oriented In-Memory Database System Design and Implementation of Transactions in a Column-Oriented In-Memory Database System Markus Olsson March 16, 2010 Master s Thesis in Computing Science, 30 ECTS credits Supervisor at CS-UmU: Stephen

More information

Joint Entity Resolution

Joint Entity Resolution Joint Entity Resolution Steven Euijong Whang, Hector Garcia-Molina Computer Science Department, Stanford University 353 Serra Mall, Stanford, CA 94305, USA {swhang, hector}@cs.stanford.edu No Institute

More information

An Update on Haskell H/STM 1

An Update on Haskell H/STM 1 An Update on Haskell H/STM 1 Ryan Yates and Michael L. Scott University of Rochester TRANSACT 10, 6-15-2015 1 This work was funded in part by the National Science Foundation under grants CCR-0963759, CCF-1116055,

More information

A Flexible Framework for Implementing Software Transactional Memory

A Flexible Framework for Implementing Software Transactional Memory A Flexible Framework for Implementing Software Transactional Memory Maurice Herlihy Brown University Providence, RI mph@cs.brown.edu Victor Luchangco Sun Microsystems Laboratories 1 Network Drive Burlington,

More information

TCS Technical interview Questions

TCS Technical interview Questions TCS Technical interview Questions 1. What is your strongest programming language (Java, ASP, C, C++, VB, HTML, C#, etc.)? 2.Differences between C and Java? 1.JAVA is Object-Oriented while C is procedural.

More information

Compiler Construction D7011E

Compiler Construction D7011E Compiler Construction D7011E Lecture 14: Memory Management Viktor Leijon Slides largely by Johan Nordlander with material generously provided by Mark P. Jones. 1 First: Run-time Systems 2 The Final Component:

More information

Guidelines for Writing C Code

Guidelines for Writing C Code Guidelines for Writing C Code Issue 01-bugfix Martin Becker Institute for Real-Time Computer Systems (RCS) Technische Universität München becker@rcs.ei.tum.de June 9, 2014 Contents 1 Introduction 1 2 Pragmatic

More information

(Pessimistic) Timestamp Ordering

(Pessimistic) Timestamp Ordering (Pessimistic) Timestamp Ordering Another approach to concurrency control: Assign a timestamp ts(t) to transaction T at the moment it starts Using Lamport's timestamps: total order is given. In distributed

More information

POLYMORPHISM 2 PART. Shared Interface. Discussions. Abstract Base Classes. Abstract Base Classes and Pure Virtual Methods EXAMPLE

POLYMORPHISM 2 PART. Shared Interface. Discussions. Abstract Base Classes. Abstract Base Classes and Pure Virtual Methods EXAMPLE Abstract Base Classes POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors class B { // base class virtual void m( ) =0; // pure virtual function class D1 : public

More information

POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors

POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors CSC 330 OO Software Design 1 Abstract Base Classes class B { // base class virtual void m( ) =0; // pure virtual

More information

A Comparison of Relativistic and Reader-Writer Locking Approaches to Shared Data Access

A Comparison of Relativistic and Reader-Writer Locking Approaches to Shared Data Access A Comparison of Relativistic and Reader-Writer Locking Approaches to Shared Data Access Philip W. Howard, Josh Triplett, and Jonathan Walpole Portland State University Abstract. This paper explores the

More information

Symbol Tables Symbol Table: In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is

More information

The Deadlock Problem (1)

The Deadlock Problem (1) Deadlocks The Deadlock Problem (1) A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 disk drives. P 1 and P 2

More information

C. E. McDowell August 25, Baskin Center for. University of California, Santa Cruz. Santa Cruz, CA USA. abstract

C. E. McDowell August 25, Baskin Center for. University of California, Santa Cruz. Santa Cruz, CA USA. abstract Unloading Java Classes That Contain Static Fields C. E. McDowell E. A. Baldwin 97-18 August 25, 1997 Baskin Center for Computer Engineering & Information Sciences University of California, Santa Cruz Santa

More information

1 Process Coordination

1 Process Coordination COMP 730 (242) Class Notes Section 5: Process Coordination 1 Process Coordination Process coordination consists of synchronization and mutual exclusion, which were discussed earlier. We will now study

More information

EMBEDDED SYSTEMS PROGRAMMING More About Languages

EMBEDDED SYSTEMS PROGRAMMING More About Languages EMBEDDED SYSTEMS PROGRAMMING 2015-16 More About Languages JAVA: ANNOTATIONS (1/2) Structured comments to source code (=metadata). They provide data about the code, but they are not part of the code itself

More information

Lock-Free Readers/Writers

Lock-Free Readers/Writers www.ijcsi.org 180 Lock-Free Readers/Writers Anupriya Chakraborty 1, Sourav Saha 2, Ryan Saptarshi Ray 3 and Utpal Kumar Ray 4 1 Department of Information Technology, Jadavpur University Salt Lake Campus

More information

Key-value store with eventual consistency without trusting individual nodes

Key-value store with eventual consistency without trusting individual nodes basementdb Key-value store with eventual consistency without trusting individual nodes https://github.com/spferical/basementdb 1. Abstract basementdb is an eventually-consistent key-value store, composed

More information

The Multicore Transformation

The Multicore Transformation Ubiquity Symposium The Multicore Transformation The Future of Synchronization on Multicores by Maurice Herlihy Editor s Introduction Synchronization bugs such as data races and deadlocks make every programmer

More information

CA341 - Comparative Programming Languages

CA341 - Comparative Programming Languages CA341 - Comparative Programming Languages David Sinclair Dynamic Data Structures Generally we do not know how much data a program will have to process. There are 2 ways to handle this: Create a fixed data

More information

Implementation of Process Networks in Java

Implementation of Process Networks in Java Implementation of Process Networks in Java Richard S, Stevens 1, Marlene Wan, Peggy Laramie, Thomas M. Parks, Edward A. Lee DRAFT: 10 July 1997 Abstract A process network, as described by G. Kahn, is a

More information

CHAPTER 6: PROCESS SYNCHRONIZATION

CHAPTER 6: PROCESS SYNCHRONIZATION CHAPTER 6: PROCESS SYNCHRONIZATION The slides do not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. TOPICS Background

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

Deallocation Mechanisms. User-controlled Deallocation. Automatic Garbage Collection

Deallocation Mechanisms. User-controlled Deallocation. Automatic Garbage Collection Deallocation Mechanisms User-controlled Deallocation Allocating heap space is fairly easy. But how do we deallocate heap memory no longer in use? Sometimes we may never need to deallocate! If heaps objects

More information

Static initializers in C++

Static initializers in C++ Static initializers in C++ Umesh Nair June 2001 1 Introduction The problem of wrong order of static initialization causes applications to crash. People try several workarounds-changing the order of dynamic

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

SmartHeap for Multi-Core

SmartHeap for Multi-Core SmartHeap for Multi-Core Getting Started and Platform Guide for Linux Version 11.2 SmartHeap and HeapAgent are trademarks of Compuware Corporation. All other trademarks are the property of their respective

More information

Distributed Transaction Management 2003

Distributed Transaction Management 2003 Distributed Transaction Management 2003 Jyrki Nummenmaa http://www.cs.uta.fi/~dtm jyrki@cs.uta.fi General information We will view this from the course web page. Motivation We will pick up some motivating

More information

FAULT TOLERANT SYSTEMS

FAULT TOLERANT SYSTEMS FAULT TOLERANT SYSTEMS http://www.ecs.umass.edu/ece/koren/faulttolerantsystems Part 16 - Checkpointing I Chapter 6 - Checkpointing Part.16.1 Failure During Program Execution Computers today are much faster,

More information

Fine-grained synchronization & lock-free programming

Fine-grained synchronization & lock-free programming Lecture 17: Fine-grained synchronization & lock-free programming Parallel Computer Architecture and Programming CMU 15-418/15-618, Spring 2016 Tunes Minnie the Moocher Robbie Williams (Swings Both Ways)

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

Object-Oriented Principles and Practice / C++

Object-Oriented Principles and Practice / C++ Object-Oriented Principles and Practice / C++ Alice E. Fischer June 8, 2015 OOPP / C++ Lecture 7... 1/20 Program Errors Error Handling Techniques Exceptions in C++ Exception Definition Syntax Throwing

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Lecture 2 Thomas Wies New York University Review Last week Programming Languages Overview Syntax and Semantics Grammars and Regular Expressions High-level

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

Composable Transactional Objects: a Position Paper

Composable Transactional Objects: a Position Paper Composable Transactional Objects: a Position Paper Maurice Herlihy 1 and Eric Koskinen 2 1 Brown University, Providence, RI, USA 2 New York University, New York, NY, USA Abstract. Memory transactions provide

More information

PROCESS SYNCHRONIZATION

PROCESS SYNCHRONIZATION PROCESS SYNCHRONIZATION Process Synchronization Background The Critical-Section Problem Peterson s Solution Synchronization Hardware Semaphores Classic Problems of Synchronization Monitors Synchronization

More information

<Insert Picture Here> Revisting Condition Variables and Transactions

<Insert Picture Here> Revisting Condition Variables and Transactions Revisting Condition Variables and Transactions Victor Luchangco and Virendra Marathe Oracle Labs Copyright 2011 Oracle and/or its affiliates ( Oracle ). All rights are reserved by

More information

Topics. File Buffer Cache for Performance. What to Cache? COS 318: Operating Systems. File Performance and Reliability

Topics. File Buffer Cache for Performance. What to Cache? COS 318: Operating Systems. File Performance and Reliability Topics COS 318: Operating Systems File Performance and Reliability File buffer cache Disk failure and recovery tools Consistent updates Transactions and logging 2 File Buffer Cache for Performance What

More information

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. System Model Deadlock Characterization Methods of handling

More information

C++ Programming: Polymorphism

C++ Programming: Polymorphism C++ Programming: Polymorphism 2018 년도 2 학기 Instructor: Young-guk Ha Dept. of Computer Science & Engineering Contents Run-time binding in C++ Abstract base classes Run-time type identification 2 Function

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

Synchronization Part 2. REK s adaptation of Claypool s adaptation oftanenbaum s Distributed Systems Chapter 5 and Silberschatz Chapter 17

Synchronization Part 2. REK s adaptation of Claypool s adaptation oftanenbaum s Distributed Systems Chapter 5 and Silberschatz Chapter 17 Synchronization Part 2 REK s adaptation of Claypool s adaptation oftanenbaum s Distributed Systems Chapter 5 and Silberschatz Chapter 17 1 Outline Part 2! Clock Synchronization! Clock Synchronization Algorithms!

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