Drop the Anchor: Lightweight Memory Management for Non-Blocking Data Structures

Size: px
Start display at page:

Download "Drop the Anchor: Lightweight Memory Management for Non-Blocking Data Structures"

Transcription

1 Drop the Anchor: Lightweight Memory Management for Non-Blocking Data Structures Anastasia Braginsky Computer Science Technion Alex Kogan Oracle Labs Erez Petrank Computer Science Technion ABSTRACT Efficient memory management of dynamic non-blocking data structures remains an important open question. Existing methods either sacrifice the ability to deallocate objects or reduce performance notably. In this paper, we present a novel technique, called Drop the Anchor, which significantly reduces the over associated with the memory management while reclaiming objects even in the presence of thread failures. We demonstrate this memory management scheme on the common linked list data structure. Using extensive evaluation, we show that Drop the Anchor significantly outperforms Hazard Pointers, the widely used technique for non-blocking memory management. Categories and Subject Descriptors E.1 [Data]: Data Structures lists, stacks, and queues; D.1. [Software]: Programming Techniques Concurrent Programming General Terms Algorithms, Design, Theory Keywords Concurrent data structures, progress guarantee, lock-freedom, parallel programming, linked list, memory management, hazard pointers, timestamps, freezing Supported by the Israeli Science Foundation (grant No. 28/1). Supported by the Ministry of Science and Technology, Israel. The work on this paper was done while the author was with the Department of Computer Science, Technion. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM or the author must be honored. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. SPAA 1, July 2 25, 21, Montréal, Québec, Canada. Copyright 21 ACM /1/7...$ INTRODUCTION Non-blocking data structures [9, 11] are fast, scalable and widely used. In the last two decades, many efficient nonblocking implementations for almost any common data structure have been developed. However, when designing a dynamic non-blocking data structure, one must address the non-trivial issue of how to manage its memory. Specifically, one has to ensure that whenever a thread removes some internal node from the data structure, then (a) the memory occupied by this node will be eventually deallocated (i.e., returned to the memory manager for arbitrary reuse), and (b) no other concurrently running thread will access the deallocated memory, even though some threads might hold a reference to the node. Previous attempts to tackle the memory management problem had limited success. Existing non-blocking algorithms usually take two standard approaches. The first approach is to rely on automatic garbage collection (GC), simply deferring the problem to the GC. By doing this, the designers hinder the algorithm from being ported to environments without GC [5]. Moreover, the implementations of these designs with currently available (blocking) GC s cannot be considered non-blocking. The second approach taken by designers of concurrent data structures is to adopt one of the available non-blocking memory management schemes. The most common schemes are probably the Hazard Pointers technique by Michael [14] or the similar Pass the Buck method by Herlihy et al. [1]. In these schemes, each thread has a pool of global pointers, called hazard pointers in [14] or guards in [1], which are used to mark objects as live or ready for reclamation. When a thread t reclaims a node, t adds the node to a special local reclamation buffer. Once in a while, t scans its buffer and for each node it checks whether some other thread has a hazard pointer 1 to the node. If not, that node can be safely deallocated. Special attention must be given to the time interval after a thread obtains a reference to an object and before it registers this object in a hazard pointer. During this time, the object may be reclaimed and reallocated. Thus, by the time it gets protected by a hazard pointer, it could have become a completely different entity. This delicate point enforces validation of the object s state after assigning it with a hazard pointer. Although these techniques are not universal (i.e., there is no automatic way to incorporate them into a given algorithm), they are relatively simple. Moreover, a failure 1 In this paper we will use the term hazard pointers, but guard pointers are equally relevant.

2 of one thread prevents only a small number of nodes (to which the failed thread has references in its hazard pointers) from being deallocated. The major drawback of these techniques, however, is their significant runtime over, caused mainly by the management and validation of the global pointers required before accessing each internal node for the first time [8]. Along with that, expensive instructions, such as memory fences or compare-and-swap (CAS) instructions [14, 1, 8], are required for correctness of those schemes. Moreover, if the validation fails, the thread must restart its operation on the data structure, harming the performance further. Another known method for memory management uses per-thread timestamps, as in [7], which are incremented by threads before every access to the data structure. When a thread removes a node, it records the timestamps of other threads. Later, it can deallocate the node once all threads increase their timestamps beyond the recorded values. Although this method is very lightweight, it is vulnerable to thread delays and failures. In such cases, memory space of an unbounded size may become impossible to reclaim [14]. In this paper, we concentrate on the linked list, one of the most fundamental data structures, which is particularly prone to the shortcomings of previous approaches [8]. The presented technique eliminates the performance over associated with the memory management without sacrificing the ability to deallocate memory in case of thread failures. The good performance of our technique stems from the assumption that thread failures are typically very uncommon in real systems, and if they do occur, this is usually indicative of more serious problems than being unable to deallocate some small part of memory. Our approach provides a flexible tradeoff between the runtime over introduced by memory management and the size of memory that might be lost when some thread fails. Our memory management technique builds on a combination of three ideas: timestamps, anchors and freezing. As in [7], we use per-thread timestamps to track the activity of each thread on the data structure. Similarly to [14], we use global pointers, which we call anchors. Unlike [14], however, a thread drops the anchor (i.e., records a reference in the anchor) every bunch of node accesses, e.g., every one thousand nodes it traverses. As a result, the amortized cost of anchor management is spread across multiple node accesses and is thus very low. To recover the data structure from a failure of a thread t, we apply freezing []. That is, using t s anchors, other threads mark nodes that t may hold a reference to, as frozen. Then they copy and replace the frozen part of the data structure, restoring the ability of all threads to deallocate memory. The recovery operation is relatively expensive, but it is required only in the uncommon case in which a thread fails to make progress for a long while. Thus, the overall cost of the memory management remains very low. We have implemented our scheme in C and compared its performance to the widely used implementation of the linked list based on Hazard Pointers (HP) [14]. Our performance results show that the total running time, using the anchorbased memory management, is about 25 5% faster the one based on HP. We also discuss how to apply our technique on other data structures, where the use of other approaches for memory management is more expensive. 2. RELATED WORK Memory management can be fairly considered as the Achilles heel of many dynamically sized non-blocking data structures. In addition to the techniques mentioned in the introduction (that use per-thread timestamps [7] or global pointers [14, 1]), one can also find an approach based on reference counting [16, 6, 4, 15]. There, the idea is to associate a counter with every node, which is updated atomically when a thread gains or drops a reference to the node. Such atomic updates are typically performed with a fetch-andadd instruction, and the node can be safely removed once its reference count drops to zero. This approach suffers from several drawbacks, such as requiring each node to keep the reference count field even after the node is reclaimed [16, 15] or using uncommon atomic primitives, such as double compare-and-swap (DCAS) [4]. The major problem, however, remains performance [14, 8], since even when applying a read-only operation on the data structure, this approach requires atomic reference counter updates on every node access. In a related work, Hart et al. [8] compare several memory management techniques, including hazard pointers, reference counters, and so-called quiescent-state-based reclamation. In the latter, the memory can be reclaimed when each thread passes through at least one quiescent state [1], in which it does not hold any reference to shared nodes, and in particular, to nodes that have been removed from the data structure. In fact, the timestamp-based technique [7] discussed in the introduction can be seen as a special case of the quiescent-state approach. Hart et al. [8] find that when using hazard pointers or reference counters, expensive atomic instructions, such as fences and compare-andswaps (CAS) executed for every traversed node, dominate the performance cost. Quiescent-state reclamation usually performs better, but it heavily depends on how often quiescent states occur. Moreover, if a thread fails before reaching the quiescent state, no memory can be safely reclaimed from that point. Dragojevic et al. [5] consider how hardware transactional memory (HTM) can help to alleviate the performance and conceptual difficulties associated with memory management techniques. In contrast to [5], our algorithm does not rely on special hardware support, such as HTM. The freezing idea was previously used in the context of concurrent data structures by Braginsky and Petrank in their recent work on chunk-based linked lists []. There, list nodes are grouped into chunks for better cache locality and list traversal performance. The freezing technique is used in [] for list restructuring to notify threads that the part of the data structure they are currently using is obsolete. This is done by setting a special freeze-bit on pointers belonging to nodes in the obsolete part, making the pointers/nodes unsuitable for traversing. A thread that fails to use a frozen pointer realizes that this part of the data structure is obsolete and it restarts its operation, usually after helping to accomplish the list restructuring procedure that froze that part.. AN OVERVIEW OF DROP THE ANCHOR As mentioned in the introduction, our technique relies on three building blocks, namely timestamps, anchors, and freezing. A thread t manages a monotonically increasing

3 running someone suspects that t has failed stuck t starts an operation t finishes an operation recovery from t's failure is completed t (re)starts an operation idle recovered Figure 1: Transition diagram for possible states of the thread t timestamp in the following way. When t starts its operation on a list data structure, it reads the timestamps of all threads and sets its timestamp to the maximal value it read plus one. When t finishes its operation, it simply marks its timestamp as idle. The timestamp of t is associated with two flags, stuck and idle. These flags specify one of the following states of the timestamp (and of the corresponding thread): running (both flags are turned off, meaning that t has a pending operation on the data structure), idle (only the idle flag is on, meaning that t does not have any pending operation on the data stucture), running, but stuck, which we call for brevity simply stuck (only the stuck flag is on, meaning that t with a pending operation is suspected by other thread(s) to be stuck) and recovered (both flags are turned on, meaning that other threads have frozen and copied the memory that might be accessed by t). The transition between these states is captured in Figure 1. Normally, t moves between running and idle states. Once some thread suspects t to be stuck, t s timestamp is marked as stuck. The only way for t to return to the running state is to go through the recovered state (cf. Figure 1). The timestamps are also used to mark the insertion and deletion times of list nodes. That is, each node in the list has two additional fields, which are set as follows. When t decides to insert (remove) a node into (from) the list, it sets the node s insertion (deletion, respectively) timestamp field to be higher by one from the maximal timestamp value that it observes among the timestamps of all threads. The nodes deleted by t are stored in t s special reclamation buffer, which is scanned by t once in a while (as in [14]). During each scan, and for each deleted node n, t checks whether the deletion time of n is smaller than the current timestamps of other threads (plus an additional condition described later), and if so, deallocates the node. This check ensures that all threads have started a new list operation since the time this node was removed from the list, and therefore, no thread can be viewing this node at this time. If threads did not fail, this would be everything needed to manage the memory of non-blocking lists by a traditional epoch-based approach [7]. Unfortunately, thread failures may happen. In the design described so far, if a thread fails during its operation on the list, no additional node can be deallocated, since the timestamp of the failed thread would not advance. To cope with the problem of thread failures, we use two additional concepts, namely anchors and freezing. Anchors are simply pointers used by threads to point to list nodes. In fact, hazard pointers[14] can be seen as a special case of anchors. The difference between the two is that the anchor is not dropped (set) before accessing every internal node in the list, but rather every ten, one hundred, or several thousands of node accesses (the frequency is controlled by the anchor threshold parameter). As a result, the amortized cost of anchor management is significantly reduced and spread across the traversal of (controllably) many nodes in the list data structure. The downside of our approach, however, is that when a thread t is suspected of being stuck, other threads do not know for sure which object t may access when (and if) it revives. They only know a range of nodes where t might be, which includes the node pointed by t s anchor plus additional nodes reachable from that anchored node. The suspecting threads use this range to recover the list from the failure of t. Specifically, they freeze all nodes in the range by setting the special freeze-bit of all pointers in these nodes 2. Next, they copy all frozen nodes into a new sub-list. Finally, they replace the frozen nodes with the new sub-list and mark t s timestamp as recovered. This mark tells other threads that the list was recovered from t s failure. In other words, threads may again deallocate nodes they remove from the data structure, disregarding t s timestamp. The recovery procedure is relatively heavy performancewise and has certain technical issues, but in return, the common path, i.e., the traversal of the data structure, incurs virtually no additional operations related to memory management. Since the recovery is expected to be very infrequent, we believe (and show in our performance measurements) that the complication associated with the recovery procedure pays off by eliminating the over in the common path. In the next section, we provide technical details of the application of this general idea into the concrete nonblocking implementation of the linked list. 4. DETAILED DESCRIPTION 4.1 Auxiliary fields and records We use the singly linked list of Harris [7] as a basis for our construction. To support our scheme, each thread maintains two records where it stores information related to the memory management. The first record is global, i.e., it can be read and written by any thread (not just the owner of the record), and used to manage the thread s timestamp and anchor. The second record is local, and is used during object reclamations and for deciding whether the recovery procedure is necessary. The structure of the records is given in Listing 1. The global record contains two fields, timestampandanchor and lowtimestamp. The timestampandanchor field contains the timestamp, the anchor, and the idle and stuck bits of the thread, combined into one word so that all can be modified atomically. The width and the actual internal structure of the field depends on the underlying machine. In certain settings of 64-bit Linux-based architectures, the virtual memory addressing requires 48 bits; the two least significant bits in a pointer are typically zeroed due to memory alignment. Moreover, most existing architectures support wide-cas instruction, which operates atomically on two adjacent memory words (i.e., 128 bits). In such settings, we allocate 64 2 The freeze-bit is one of the least significant bits of a pointer, which are normally zeroed due to memory alignment.

4 Listing 1: Auxiliary records s t r u c t GlobalMemoryManagementRec{ u i n t t timestampandanchor ; u i n t 6 4 t lowtimestamp ; } ; s t r u c t LocalMemoryManagementRec{ l i s t t r e c l a m a t i o n B u f f e r ; u i n t 6 4 t mintimestamp ; u i n t 2 t mintimestampthreadid ; u i n t 2 t mintimestampthreadcnt ; } ; bits for the timestamp and 64 bits for the anchor pointer, including two bits for two flags, which specify the state of the thread (i.e., running, idle, stuck and recovered). In the settings where only 64 bits can be a target for a CAS instruction, one can use 48 bits or fewer for the anchor pointer and, respectively, 16 bits for timestamp. However, different allocation techniques can be used to require fewer bits for the pointer. When a thread t accesses the list, it reads the timestamps of all threads in the system and sets its own timestamp to one plus the maximum among all the timestamp values that were read. It writes its new timestamp in the timestampandanchor field, simultaneously setting the idle bit to zero. When t completes its operation, it simply turns the idle bit on (leaving the same timestamp value). The exact details of the manipulation of this field are provided in subsequent sections. In addition to the timestampandanchor field, the global record contains a field called lowtimestamp. This field is set by t to the minimal timestamp observed by t when it starts an operation on the list. As described in Section 4.4, the lowtimestamp field is used by other threads when they try to recover the list from the failure of t (to identify nodes that were inserted into the list before t started its current operation). The local record has four fields. The description of their role is given in Section 4.. Along with adding auxiliary records for each thread, we also augment each node in the linked list with two fields having self-explanatory names, insertts and retirets. These fields are set to the current maximal timestamp plus one when a node is inserted into or deleted from the list, respectively. 4.2 Anchor maintenance Anchor maintenance is carried out when threads traverse the list, looking for a particular key. The simplified pseudocode for this traversal composes the find method given in the full version of this paper [2]. Recall that this method is used by all list operations in [7]. A thread counts the number of list nodes it has passed through and updates its anchor every anchor threshold nodes (where anchor threshold is some preset number). The anchor points to the first node in the list that can be accessed by the thread (which is the node pointed by prev in the find method). Anchor updates are made in the auxiliary setanchor function also shown in [2]. An anchor update may fail for thread t i if some other thread t j has marked the timestampandanchor field of t i as stuck, as explained in Section 4.4. It is important to note that the actual update of the anchor is done with CAS (and not with a simple write operation) to avoid races with concurrently running threads that might suspect t i being stuck and try to set the stuck bit in t i s timestampandanchor. From a performance standpoint, however, the write operation of a hazard pointer, made on accessing every node, requires an expensive memory fence right after it [14, 8]. In contrast, the CAS in our approach is performed only every anchor threshold node accesses, and its amortized cost is negligible. We note that the find function is allowed to traverse the frozen nodes of the list. A node is frozen if the second least significant bit in its next pointer is turned on (while the first least significant bit is used to mark the node as deleted [7]). If there is a need to update the next pointer of the frozen node, the update operation fails (as in []) and retries after invoking the helprecovery method (pseudo-code can be found in [2]). As its name suggests, the latter method is used to help the recovery process of some stuck thread. This method is also called when a thread fails to update its anchor in setanchor. Finally, we note that at any time instant, list operations have references to at most two adjacent list nodes. (Recall that for the linked list data structure two hazard pointers are required [14]). As we require that a stuck thread will be able to access nodes only between its current anchor and (but not including) the next potential anchor, the anchor threshold parameter for the linked lists has to be at least Node reclamation When a thread t i removes a node from the list, it calls the retirenode method, which sets the deletion timestamp of the node (i.e., the retirets field) to the current maximal timestamp plus one. Then, similarly to [14], the retirenode method adds the deleted node to a reclamation buffer. The latter is simply a local linked list (cf. Listing 1) where t i stores nodes deleted from the list data structure, but not deallocated yet. When the size of the buffer reaches a predefined bound (controlled by the retire threshold parameter), t i runs through the buffer and deallocates all nodes with the retire timestamp smaller than the current minimal timestamp (plus an additional condition elaborated in Section 4.4). Note that if the deletion time of a node n is smaller than the timestamp of a thread t j, t j started its last operation on the list after n was removed from the list; thus, t j will never access n. Obviously, if this holds for any t j, it is safe to deallocate n. When t i finds that some thread t j exists such that the timestamp of t j is smaller than or equal to the timestamp of one of the nodes in t i s reclamation buffer, t i stores the ID of that thread (i.e., j) in the mintimestampthreadid field of its local memory management record (cf. Listing 1) and t j s timestamp in the mintimestamp field of that record. It also sets the mintimestampthreadcnt field to 1. It is important to note that if several threads have the same minimal timestamp, t i will store the smallest ID in mintimestampthreadid. This will ensure that even if several threads are stuck with the same timestamp, all threads will consider the same thread in the recovery procedure.

5 On later scans of the reclamation buffer, if t i finds that the thread t j (whose ID is stored in t i s mintimestampthreadid) still has the same timestamp, t i will increase the mintime- StampThreadCnt counter. Once the counter reaches the predefined recovery threshold parameter, t i will suspect that t j has failed and will start the recovery procedure described in Section Recovery procedure The recovery procedure is invoked in one of the following three cases. First, it is invoked by a thread t i that tries to deallocate an object n from its reclamation buffer, but repeatedly finds a running thread t j whose timestamp remains smaller than or equal to the timestamp of n (cf. Section 4.). The second case is when a thread t i tries to modify the next pointer of one of the nodes in the list, but finds that this node is frozen (cf. Section 4.2). Finally, the third case happens when a thread tries to update its anchor by modifying its timestampandanchor field, but finds that some other thread turned the stuck bit on in this field (cf. Section 4.2). In two last cases t i invokes the helprecovery method. There, t i scans through global records of the threads, looking for a thread t j with the stuck bit in t j s timestampandanchor field turned on. The recovery procedure consists of four phases (the code can be found in [2]). We explain these phases using the example in Figure 2. Assume that at some point in time the list data structure is in the state depicted in Figure 2(a), and thread t decides to recover the list from the failure of thread t 1. Before invoking the first phase of the recovery procedure, t stores locally the current value of t 1 s timestampandanchor field. Then, in the first phase of the recovery procedure, t attempts to modify t 1 s timestampandanchor field by turning the stuck bit on using CAS operation (cf. Figure 2(b)). If this operation fails, t rereads t 1 s timestampandanchor field and checks whether it was marked as stuck by some other thread. If not, it aborts the recovery procedure (since either t 1 is actually alive and has modified its timestampandanchor field, or some other thread, i.e., t 2, has finished the recovery of t 1 and, as we will see later, turned both stuck and idle bits on). Otherwise, if the CAS operation that turns the stuck bit on succeeds, or if it fails, but t 1 is marked as stuck by another thread, t proceeds to the second phase. In the second phase of the recovery procedure, t freezes and copies all nodes that t 1 might access if t 1 revived and traversed the list until realizing at the next anchor update that its anchor is marked as stuck. To identify such nodes, t extracts t 1 s anchor pointer out of the value stored in t 1 s timestampandanchor field (which points to node 25 in our example in Figure 2(a)). Then, t starts setting the freeze-bit in the next pointers of reachable nodes, starting from node 25. It copies the frozen nodes (with the freeze-bit set off) into a new list. Note that some of the nodes may already be deleted from the list (e.g., node 25, 27 and 42 in Figure 2), but not disconnected or reclaimed yet. Such nodes are frozen, but they do not enter the new copied part of the list. The thread t keeps freezing and copying until it passes through anchor threshold nodes having an insertion timestamp smaller than the value of t 1 s lowtimestamp field. In our example in Figure 2, let us assume that these are nodes 25, 27, 4, and 42. Note that for traversing those nodes, t had to update its own anchor to be the same as t 1 s anchor in order to handle t s failure during the recovery procedure. At the end of the second phase the list looks as depicted in Figure 2(c). The pseudo-code for how we freeze the nodes and create the copies can be found in [2]. In the third phase, t attempts to replace the frozen nodes with a locally copied part of the list. To this end, it runs from the beginning of the list data structure and looks for the first (not-deleted) node m whose next pointer either points to the not-deleted frozen nodes or it is followed by a sequence of one or more deleted nodes such that the next pointer of the last node in the sequence points to a not-deleted frozen node (in Figure 2(c), m is the node 12). If such m were not found by reaching the end of the list data structure, t would finish this phase, as it would assume that some other thread has replaced the frozen part of the list with the new list created by that thread. Otherwise, t attempts to update m s next pointer to point to the corresponding copied node in the new list. If it fails, it restarts this phase from the beginning. Otherwise, t inserts all nodes between m and the first frozen node (i.e., node 2 in Figure 2(c)) into its reclamation buffer in order to deallocate them later, bringing the list to the state exhibited in Figure 2(d). The code of the procedure for replacing frozen nodes can also be found in [2]. One subtlety that is left out of the code for lack of space, is the verification that the new local list indeed matches the frozen nodes being replaced. It is crucial to ensure that if a thread running the recovery procedure gets delayed, it does not replace another frozen part of the list when it resumes. To this end, we record the sources of the new nodes, when they are copied, and CAS the new list into the data structure only if it replaces the adequate original nodes that can be found in the recorded sources. In the final, fourth phase, t sets the idle bit in the t 1 s timestampandanchor field, marking t 1 as recovered. Additionally, t promotes t 1 s timestamp, recording the (logical) time when t 1 was recovered (cf. Figure 2(e)). Note that t does not need to check whether its CAS has succeeded, since if it hasn t, some other thread has performed this operation. We denote a timestamp of a thread with idle and stuck flags turned on as recovery timestamp. 4.5 The refined reclamation procedure Thread t 1, considered stuck, might actually have a pointer to a node n which is already not a part of the list. For instance, in the state of the list shown in Figure 2(a), t 1 might be stopped while inspecting node 25 (or 27). If this node is currently in the reclamation buffer of some other thread t k (i.e., t or t 2), and if t k does not consider t 1 after the recovery is done (i.e., t k only checks that node 25 s retirets is smaller than the timestamp of any running thread), t k might deallocate node 25 and t 1 might erroneously access this memory if and when it revives. Note that node 27 may already be unreachable from the node pointed by t 1 s anchor by the time of t 1 s recovery, if, e.g., the next pointer of node 25 was updated while t 1 was inspecting node 27. In this case, node 27 will not be frozen and copied at all. In order to cope with such situations, before deallocating a node we require its retire timestamp (retirets) to be larger than the timestamp of any thread in the recovered state (in addition to being smaller than the timestamp of any running thread). This way we prevent nodes removed from the list

6 thread thread 1 thread x 4 42 x thread thread 1 thread thread 12 2 x thread thread x 24 thread 12 2 x thread thread x 24 (a) The state of the list before the recovery is in- voked thread 12 2 x thread thread x 2 4 TS anchor 25 I x S 27 TS x anchor I S thread 12 2 x thread thread x x thread 4 thread 1 42 x 4 thread thread thread 1 thread 2 thread thread 1 thread x 4 42 x x 4 42 x 4 thread thread 1 thread 2 thread thread 1 thread x 4 42 x thread thread 1 thread x 4 42 x thread 12 2 x thread thread x 24 4 (b) Phase x 4 42 x 4 4 thread thread 1 thread 2 (c) Phase x 4 42 x 4 thread 4 thread 1 thread 2 (d) Phase 12 2 x 4 42 x TS anchor I S thread thread 1 thread x 4 42 x 4 thread thread 1 thread x 4 42 x x 4 42 x 4 4 (e) Phase 4 4 Figure 2: Recovery phases. Nodes marked with x are deleted, i.e., the delete-bit of their next pointer is turned on [7]. Shaded nodes are frozen, i.e., the freeze-bit of their next pointer is turned on.

7 before some thread got recovered from being deallocated, as the thread being recovered might hold a pointer to such node. When (and if) the recovered thread becomes running again, it will be possible to reclaim those nodes. To summarize, when a thread wants to deallocate a node n, it checks that n is not frozen (i.e., the freeze-bit in its next pointer is not set) and that the following condition holds: MAX({timestamp of t x t x is recovered}) < n.retirets < MIN({timestamp of t x t x is running}) It should be noted that when calculations of the retire timestamp and the recovery timestamp are done simultaneously (by different threads), the retire timestamp can erroneously be higher than the recovery timestamp, and wrong reclamation can happen. Therefore, when calculating the retire timestamp for a node, we require a thread to pass twice over the timestamps of the threads verifying that no thread was marked stuck or recovered concurrently. If such thread(s) is found, the node is inserted into the reclamation stack as frozen. For simplicity of presentation, in the algorithm described above frozen nodes are not reclaimed. Such nodes can only appear if threads fail and such a solution may be acceptable. However, frozen nodes can be easily reclaimed for recovered threads that have resumed operation. A recovered thread can reclaim nodes according to the recovery timestamps. Also, a frozen node that appears in a reclamation stack can be reclaimed using its retirets field and the lowtimestamp field of all stuck threads. Details are omitted. 4.6 Correctness argument In this section we give high-level arguments behind the proofs of correctness. We start by outlining the assumed memory model and defining linearization points for the modified list operations. Then we argue that any internal node deleted after the last recovery was finished (or deleted any time if no thread has been suspected being stuck) will be eventually reclaimed (we call this property eventual conditional reclamation). Next, we argue that our technique guarantees the safety of memory references. In other words, no thread t accesses the memory that has been reclaimed since the time t obtained a reference to it. Finally, we argue that our technique is non-blocking, meaning that whenever a thread t starts the recovery procedure, then after a finite number of t s steps either t completes the recovery, or some other thread completes an operation on the list. In addition, we show that the system-wide progress with respect to the list operations is preserved, that is after a finite number of completed recovery procedures there is at least one completed list operation. Due to space limitation, the proof sketch of all lemmas appears in the full version of this paper [2] Model and linearizability Our model for concurrent multi-threaded computation follows the linearizability model of [12]. In particular, we assume an asynchronous shared memory system where n deterministic threads communicate by executing atomic operations on some finite number of shared variables. Each thread performs a sequence of steps, where in each step the tread may perform some local computation or invoke a single atomic operation on a shared variable. The atomic operations allowed in our model are reads, writes, or compareand-swaps (CAS). The latter receives a memory address of a shared variable v and two values, old and new. It sets the value of v to new only if the value of v right before CAS is applied is old; in this case CAS returns true. Otherwise, the value of v does to change and CAS returns false. We assume that each thread has an ID, denoted as tid, which is a value between and n 1. In systems where tid may have values from arbitrary range, known non-blocking renaming algorithms can be applied (e.g., [1]). In addition, we assume each thread can access its tid and n. The original implementation of all operations of the nonblocking linked list by Harris [7] is linearizable [12]. We argue that after applying Drop the Anchor memory management technique, all list operations remain linearizable. Recall that all list operations invoke the find method, which returns pointers to two adjacent nodes, one of which holds the value smaller than the given key. For further details, see [7]). Denote this node as prev. Furthermore, recall that list operations may invoke find several times. For instance, insert will invoke find again if the next pointer of prev has being concurrently modified (in particular, in our case, frozen). Thus, we define the linearization points for a list operation op with respect to the prev returned from the last invocation of find by op. If this prev node is not frozen (i.e., the freeze-bit of its next pointer is not set), the linearization point of op is exactly as in [7]. However, if this prev node is frozen, we set the linearization point of op at the time instance defined as following. Consider the sequence of frozen nodes read by the corresponding find operation starting from a frozen node m and including the (frozen) node prev (where m and prev might be the same node). The linearization point of op is defined at the latest of the two events: (a) the corresponding find traversed m (i.e., read the next pointer of the node previous to m in the list) and (b) the latest time at which some node between (and including) m and prev was inserted or marked as deleted. The intuition is that when find returns a result from a frozen part of the list, this part no longer reflects the actual state of the list at the moment prev node is read. Thus, we have to linearize the corresponding operation at some earlier time instance, at which the nodes read by find are still consistent with the actual keys stored in the list Eventual conditional reclamation Lemma 4.1. Let T s and T f be the time when a thread t starts and finishes, respectively, the call to retirenode(node) and T r > T f is the time when t finishes to scan its reclamation buffer. Then at least one of the following events occurs in the time interval [T s, T r]: 1. Some thread remains running throughout [T f, T r], and its timestamp changes at most once in [T f, T r]. 2. Some thread becomes recovered at some point in time in [T s, T r].. The memory allocated to node is reclaimed by the time T r. Based on the lemma above, we prove that when a thread removes a node from the list, as long as that tread keeps applying (delete) operations on the list and particularly bad things do not happen to other threads (e.g., they are not suspected to be failed), the memory of that node will be eventually reclaimed.

8 Running time in seconds Total time for different number of threads using different memory reclamation techniques HP (with fence instruction) Anchor every 2 nodes Anchor every 1 nodes Anchor every 1 nodes Delayed Reclamation Over in seconds Relative performance ratio compared to delayed reclamation HP (with fence) Ratio Anchor 2 Ratio Anchor 1 Ratio Anchor 1 Ratio Number of threads Number of threads (a) The total running time comparison for searches only. (b) Memory management over referred to delayed reclamation for searches only. Figure : Drop the Anchor vs. workload results. Hazard Pointers for lists with the initial size of 1k keys, the read-only Lemma 4.2. Let T s be the time when a thread t starts the call to retirenode(node). Then node will be eventually reclaimed as long as t keeps removing nodes from the list and there is no thread that is stuck or recovered at or after T s. Note that even if some thread t x gets stuck or recovered after T s as above, it may have impact only on nodes being removed before (or concurrently to) t x s recovery Safety of memory references First, we prove that access to any node that can be reached from t s anchor (for any thread t) is safe, i.e., such node cannot be reclaimed. Lemma 4.. No node reachable from an anchor of some thread can be reclaimed. Using the lemma above, we show that with the Drop the Anchor memory management, no thread will access a reclaimed memory. Lemma 4.4. No thread t accesses the memory that has been reclaimed since the time t obtained a reference to it Progress guarantees The original implementation of all operations of the nonblocking linked list by Harris [7] is lock-free [12]. We argue that after applying Drop the Anchor memory management technique, all list operations remain lock-free. We say that a thread t i starts the recovery of a thread t j when t i sets the stuck bit on in t j s timestampandanchor field. Similarly, we say a thread t i completes the recovery of a stuck thread t j when t i sets the idle bit on in t j s timestampandanchor field. Lemma 4.5. If a thread t i starts the recovery of t j at T s, then the recovery of t j will be completed at T f > T s (by possibly another thread t k ) and/or infinitely many list operations will be linearized after T s. Next, we show that despite recovery operations, the systemwide progress is preserved, i.e., threads never keep recovering one another forever without completing list operations. Lemma 4.6. Consider n+1 recovery operations completed at times T 1 < T 2 <... < T n+1. Then there must be at least one list (delete) operation linearized in the time interval [T 1, T n+1]. 5. PERFORMANCE EVALUATION We have implemented the non-blocking linked list data structure of Harris [7] with several memory management techniques. First, we have implemented the Hazard Pointers technique following the pseudo-code presented in [14], but with the additional memory fence instruction added just after the write of a new value to the hazard pointer of a thread [8]. Second, we have implemented our new Drop the Anchor technique presented in this paper. Finally, we have also implemented a simple technique, where nodes removed by a thread t from the list are added to t s reclamation stack and reclaimed later once 64 nodes are collected in the reclamation stack. We refer to this implementation as delayed reclamation. We note that this scheme is incorrect in a sense that it allows threads to access deallocated memory, but we used this implementation to represent a memory management scheme with a minimal performance impact. All our implementations were coded in C and compiled with -O optimization level. We have run our experiments on the machine with two AMD Opteron(TM) core processors, operated by Linux OS (Ubuntu 12.4). We have varied the number of threads between 1 and 4, slightly above the number of threads that can run concurrently on this machine (2). If not stated otherwise, each test starts by building an initial list with 1k random keys. After that, we measure the total time of 2k operations divided equally between all threads. The keys for searches and insertions are randomly chosen 2-bit sized keys. For deletion operations, we ensure that randomly chosen keys actually exist in the list in order to make the reclamation process substantial. The values of recovery threshold and retire threshold were always 64. All threads are synchronized to start their operations immediately after the initial list is built and we

9 Running time in seconds Total time for different number of threads using different memory reclamation techniques Number of threads HP (with fence instruction) Anchor every 2 nodes Anchor every 1 nodes Anchor every 1 nodes Delayed Reclamation Over in seconds Relative performance ratio compared to delayed reclamation Number of threads HP (with fence) Ratio Anchor 2 Ratio Anchor 1 Ratio Anchor 1 Ratio (a) The total running time comparison for 2% inserts, 2% deletes and 6% searches. (b) Memory management over referred to delayed reclamation for 2% inserts, 2% deletes and 6% searches. Figure 4: Drop the Anchor vs. Hazard Pointers for lists with the initial size of 1k keys, the mixed workload results. measure the time it takes to complete all operations by all threads. We run each test 1 times and present the average results. The variance of all reported results is below 1.5% of the average. Figures and 4 show the measurements of the total time required to complete our benchmark using the HP memory management, the delayed reclamation and the Drop the Anchor method. For the latter, we have used three versions with different values for the anchor threshold value. Specifically, in the first version the anchor is dropped every second node (which is the lowest legitimate value for anchor threshold in the case of the linked list), in the second version the anchor is dropped every 1 nodes, and in the third every 1 nodes. We show the results for read-only workload where all operations are searches (Figure (a)) and for the mixed workload, where 2% of all operations are insertions, 2% are deletions, and the remaining 6% are searches (Figure 4(a)). Our measurements show that in the mixed workload the Drop the Anchor-based implementation is faster in about 15 25% than the HP-based one, even if the anchor is dropped every second node. When increasing the anchor threshold parameter from 2 to 1, we get even higher improvement of 45% over the performance of HPs. In read-only workload we can see even better performance improvement (4% on average) due to anchors usage compared to HP usage (cf. Figure (a)). Finally, we can see that for substantial amount of threads, the Drop the Anchorbased linked list performance is very close to the linked list implementation based on the simple delayed reclamation. This suggests that the amortized cost of the memory management in the Drop the Anchor technique is very small. Additionally, Figures (b), 4(b) present the relative performance ratio of each memory management technique, explained above, compared to delayed reclamation. When the ratio is close to 1 it means that the memory management technique adds almost no over over the delayed reclamation. The HP memory management shows 4 55% slowdown, where Anchor-based implementation shows 7 1% slowdown for anchors dropped every 1 nodes, and 2 25% slowdown for anchors dropped every 2 nodes, all compared to delayed reclamation results. In another set of experiments, we measure the impact of the initial size of the list on the performance of the HPbased and Drop the Anchor-based implementations, while the number of threads is constant (16) and the workload is mixed. The results are depicted in Figure 5(a). It can be seen that the running time of both implementations increases linearly with the size of the list as threads need to traverse more nodes per operation on average. The slope of the HP-based implementation is much steeper, however, suggesting that the over introduced by fences is much more significant than the cost of the anchor management. In Figure 5(b) we can see the performance impact of the recovery procedure in the Drop the Anchor technique. We use the version of the technique with the anchor threshold value equals 1 for more significant impact. We explicitly delay one of the threads, thus causing this thread to be considered as stuck and recovered by other threads. The stuck thread returns to run after 2 seconds and the presented total time is measured until all threads finish their runs. The results show that the recovery procedure has 15 5% impact on the performance, even when the anchor threshold value is high. In any case, the Anchors-based implementation s performance (with the delay and recovery) is much better than the HP-based one. 6. DISCUSSION We presented a new method for memory management of non-blocking data structures called Drop the Anchor. Drop the Anchor is a novel combination of the time-stamping method (which cannot handle thread failures) with the anchors and freezing techniques that provide a fallback allowing reclamation even when threads fail. Non-blocking algorithms must be robust to thread failures and so coping with thread failures in the memory manager is crucial. We have applied Drop the Anchor for the common nonblocking linked list implementation and compared it with

10 Total time for different list sizes Recovery performance impact Running time (seconds) HP (with fence instruction) Anchor every 1 nodes Running time in seconds HP (with fence instruction) Anchor every1 nodes with recovery Anchor every 1 nodes Initial list sizes Number of threads (a) Drop the Anchor vs. Hazard Pointers when 16 threads are run on lists with different initial sizes. In the Anchor-based implementation, the anchor is dropped every 1 nodes. (b) The impact of the recovery on the performance of lists with the initial size of 1k keys. Figure 5: Drop the Anchor vs. performance impact. Hazard Pointers for lists with the different initial sizes and the recovery the standard Hazard Pointers method. Measurements show that Drop the Anchor drastically reduces the memory management over, while robustly reclaiming objects in all executions. We believe our technique can be applied for other nonblocking data structures. Specifically, assume a data structure represented by a directed graph, where vertices correspond to internal nodes and edges correspond to pointers between these nodes. When recovering a thread t, we need to freeze and copy the sub-graph containing all internal nodes at the distance that depends on the anchor threshold parameter, from the node pointed by t s anchor. Essentially, although the copying operation might be expensive and even involve the whole data structure, the scalability bottleneck associated with the memory fences will be removed from the common node access step. 7. ACKNOWLEDGMENTS We want to thank Tim Harris for his helpful comments on the earlier version of this paper. 8. REFERENCES [1] H. Attiya and A. Fouren. Adaptive and efficient algorithms for lattice agreement and renaming. SIAM J. Comput., 1(2): , 21. [2] A. Braginsky, A. Kogan, and E. Petrank. Drop the anchor: Lightweight memory management for non-blocking data structures (full version). erez/papers/- DropTheAnchorFull.pdf. [] A. Braginsky and E. Petrank. Locality-conscious lock-free linked lists. In ICDCN, pages , 211. [4] D. Detlefs, P. A. Martin, M. Moir, and G. L. Steele. Lock-free reference counting. Distributed Computing, 15(4): , 22. [5] A. Dragojevic, M. Herlihy, Y. Lev, and M. Moir. On the power of hardware transactional memory to simplify memory management. In PODC, pages 99 18, 211. [6] A. Gidenstam, M. Papatriantafilou, H. Sundell, and P. Tsigas. Efficient and reliable lock-free memory reclamation based on reference counting. TPDS, 2(8): , 29. [7] T. L. Harris. A pragmatic implementation of non-blocking linked-lists. In DISC, pages 14, 21. [8] T. E. Hart, P. E. McKenney, A. D. Brown, and J. Walpole. Performance of memory reclamation for lockless synchronization. Journal of Parallel and Distributed Computing, 67(12): , 27. [9] M. Herlihy. Wait-free synchronization. ACM Trans. Program. Lang. Syst., 1(1): , [1] M. Herlihy, V. Luchangco, P. Martin, and M. Moir. Nonblocking memory management support for dynamic-sized data structures. ACM Trans. Comput. Syst., 2(2): , 25. [11] M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., 28. [12] M. P. Herlihy and J. M. Wing. Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst., 12():46 492, 199. [1] P. E. McKenney and J. D. Slingwine. Read-copy update: Using execution history to solve concurrency problems. In PDCS, pages , [14] M. M. Michael. Hazard pointers: Safe memory reclamation for lock-free objects. TPDS, 15:491 54, 24. [15] H. Sundell. Wait-free reference counting and memory management. In IPDPS, 25. [16] J. D. Valois. Lock-free linked lists using compare-and-swap. In PODC, pages , 1995.

Lock-Free and Practical Doubly Linked List-Based Deques using Single-Word Compare-And-Swap

Lock-Free and Practical Doubly Linked List-Based Deques using Single-Word Compare-And-Swap Lock-Free and Practical Doubly Linked List-Based Deques using Single-Word Compare-And-Swap Håkan Sundell Philippas Tsigas OPODIS 2004: The 8th International Conference on Principles of Distributed Systems

More information

CBPQ: High Performance Lock-Free Priority Queue

CBPQ: High Performance Lock-Free Priority Queue CBPQ: High Performance Lock-Free Priority Queue Anastasia Braginsky 1, Nachshon Cohen 2, and Erez Petrank 2 1 Yahoo! Labs Haifa anastas@yahoo-inc.com 2 Technion - Israel Institute of Technology {ncohen,erez}@cs.technion.ac.il

More information

Reuse, don t Recycle: Transforming Lock-free Algorithms that Throw Away Descriptors

Reuse, don t Recycle: Transforming Lock-free Algorithms that Throw Away Descriptors Reuse, don t Recycle: Transforming Lock-free Algorithms that Throw Away Descriptors Maya Arbel-Raviv and Trevor Brown Technion, Computer Science Department, Haifa, Israel mayaarl@cs.technion.ac.il, me@tbrown.pro

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

arxiv: v1 [cs.dc] 4 Dec 2017

arxiv: v1 [cs.dc] 4 Dec 2017 Reclaiming Memory for Lock-Free Data Structures: There has to be a Better Way Trevor Brown Institute of Science and Technology, Austria me@tbrown.pro arxiv:1712.01044v1 [cs.dc] 4 Dec 2017 Abstract Memory

More information

BQ: A Lock-Free Queue with Batching

BQ: A Lock-Free Queue with Batching BQ: A Lock-Free Queue with Batching Gal Milman Technion, Israel galy@cs.technion.ac.il Alex Kogan Oracle Labs, USA alex.kogan@oracle.com Yossi Lev Oracle Labs, USA levyossi@icloud.com ABSTRACT Victor Luchangco

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

Tom Hart, University of Toronto Paul E. McKenney, IBM Beaverton Angela Demke Brown, University of Toronto

Tom Hart, University of Toronto Paul E. McKenney, IBM Beaverton Angela Demke Brown, University of Toronto Making Lockless Synchronization Fast: Performance Implications of Memory Reclamation Tom Hart, University of Toronto Paul E. McKenney, IBM Beaverton Angela Demke Brown, University of Toronto Outline Motivation

More information

Cache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency

Cache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency Cache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency Anders Gidenstam Håkan Sundell Philippas Tsigas School of business and informatics University of Borås Distributed

More information

LOCKLESS ALGORITHMS. Lockless Algorithms. CAS based algorithms stack order linked list

LOCKLESS ALGORITHMS. Lockless Algorithms. CAS based algorithms stack order linked list Lockless Algorithms CAS based algorithms stack order linked list CS4021/4521 2017 jones@scss.tcd.ie School of Computer Science and Statistics, Trinity College Dublin 2-Jan-18 1 Obstruction, Lock and Wait

More information

Ownership of a queue for practical lock-free scheduling

Ownership of a queue for practical lock-free scheduling Ownership of a queue for practical lock-free scheduling Lincoln Quirk May 4, 2008 Abstract We consider the problem of scheduling tasks in a multiprocessor. Tasks cannot always be scheduled independently

More information

Wait-Free Multi-Word Compare-And-Swap using Greedy Helping and Grabbing

Wait-Free Multi-Word Compare-And-Swap using Greedy Helping and Grabbing Wait-Free Multi-Word Compare-And-Swap using Greedy Helping and Grabbing H. Sundell 1 1 School of Business and Informatics, University of Borås, Borås, Sweden Abstract We present a new algorithm for implementing

More information

Progress Guarantees When Composing Lock-Free Objects

Progress Guarantees When Composing Lock-Free Objects Progress Guarantees When Composing Lock-Free Objects Nhan Nguyen Dang and Philippas Tsigas Department of Computer Science and Engineering Chalmers University of Technology Gothenburg, Sweden {nhann,tsigas}@chalmers.se

More information

Section 4 Concurrent Objects Correctness, Progress and Efficiency

Section 4 Concurrent Objects Correctness, Progress and Efficiency Section 4 Concurrent Objects Correctness, Progress and Efficiency CS586 - Panagiota Fatourou 1 Concurrent Objects A concurrent object is a data object shared by concurrently executing processes. Each object

More information

Efficient and Reliable Lock-Free Memory Reclamation Based on Reference Counting

Efficient and Reliable Lock-Free Memory Reclamation Based on Reference Counting Efficient and Reliable Lock-Free Memory Reclamation d on Reference ounting nders Gidenstam, Marina Papatriantafilou, Håkan Sundell and Philippas Tsigas Distributed omputing and Systems group, Department

More information

Non-blocking Array-based Algorithms for Stacks and Queues!

Non-blocking Array-based Algorithms for Stacks and Queues! Non-blocking Array-based Algorithms for Stacks and Queues! Niloufar Shafiei! Department of Computer Science and Engineering York University ICDCN 09 Outline! Introduction! Stack algorithm! Queue algorithm!

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

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

Log-Free Concurrent Data Structures

Log-Free Concurrent Data Structures Log-Free Concurrent Data Structures Abstract Tudor David IBM Research Zurich udo@zurich.ibm.com Rachid Guerraoui EPFL rachid.guerraoui@epfl.ch Non-volatile RAM (NVRAM) makes it possible for data structures

More information

Incompatibility Dimensions and Integration of Atomic Commit Protocols

Incompatibility Dimensions and Integration of Atomic Commit Protocols The International Arab Journal of Information Technology, Vol. 5, No. 4, October 2008 381 Incompatibility Dimensions and Integration of Atomic Commit Protocols Yousef Al-Houmaily Department of Computer

More information

StackTrack: An Automated Transactional Approach to Concurrent Memory Reclamation

StackTrack: An Automated Transactional Approach to Concurrent Memory Reclamation StackTrack: An Automated Transactional Approach to Concurrent Memory Reclamation Dan Alistarh Patrick Eugster Maurice Herlihy Alexander Matveev Nir Shavit MSR Cambridge daalista@microsoft.com Purdue University

More information

Fast and Lock-Free Concurrent Priority Queues for Multi-Thread Systems

Fast and Lock-Free Concurrent Priority Queues for Multi-Thread Systems Fast and Lock-Free Concurrent Priority Queues for Multi-Thread Systems Håkan Sundell Philippas Tsigas Outline Synchronization Methods Priority Queues Concurrent Priority Queues Lock-Free Algorithm: Problems

More information

Run-Time Environments/Garbage Collection

Run-Time Environments/Garbage Collection Run-Time Environments/Garbage Collection Department of Computer Science, Faculty of ICT January 5, 2014 Introduction Compilers need to be aware of the run-time environment in which their compiled programs

More information

Fast and Robust Memory Reclamation for Concurrent Data Structures

Fast and Robust Memory Reclamation for Concurrent Data Structures Fast and Robust Memory Reclamation for Concurrent Data Structures [Technical Report] Oana Balmau EPFL Rachid Guerraoui EPFL Maurice Herlihy Brown University Igor Zablotchi EPFL ABSTRACT In concurrent systems

More information

Reuse, Don t Recycle: Transforming Lock-Free Algorithms That Throw Away Descriptors

Reuse, Don t Recycle: Transforming Lock-Free Algorithms That Throw Away Descriptors Reuse, Don t Recycle: Transforming Lock-Free Algorithms That Throw Away Descriptors Maya Arbel-Raviv 1 and Trevor Brown 2 1 Technion, Computer Science Department, Haifa, Israel mayaarl@cs.technion.ac.il

More information

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and education use, including for instruction at the authors institution

More information

The Universality of Consensus

The Universality of Consensus Chapter 6 The Universality of Consensus 6.1 Introduction In the previous chapter, we considered a simple technique for proving statements of the form there is no wait-free implementation of X by Y. We

More information

Allocating memory in a lock-free manner

Allocating memory in a lock-free manner Allocating memory in a lock-free manner Anders Gidenstam, Marina Papatriantafilou and Philippas Tsigas Distributed Computing and Systems group, Department of Computer Science and Engineering, Chalmers

More information

Automatic Memory Reclamation for Lock-Free Data Structures

Automatic Memory Reclamation for Lock-Free Data Structures Automatic Memory Reclamation for Lock-Free Data Structures Nachshon Cohen Technion Institute of Technology, Israel nachshonc@gmail.com Erez Petrank Technion Institute of Technology, Israel erez@cs.technion.ac.il

More information

Exploring mtcp based Single-Threaded and Multi-Threaded Web Server Design

Exploring mtcp based Single-Threaded and Multi-Threaded Web Server Design Exploring mtcp based Single-Threaded and Multi-Threaded Web Server Design A Thesis Submitted in partial fulfillment of the requirements for the degree of Master of Technology by Pijush Chakraborty (153050015)

More information

Hazard Pointers. Safe Resource Reclamation for Optimistic Concurrency

Hazard Pointers. Safe Resource Reclamation for Optimistic Concurrency Document Number: P0233R1 Date: 2016 05 29 Reply to: maged.michael@acm.org, michael@codeplay.com Authors: Maged M. Michael, Michael Wong Project: Programming Language C++, SG14/SG1 Concurrency, LEWG Hazard

More information

ACONCURRENT system may be viewed as a collection of

ACONCURRENT system may be viewed as a collection of 252 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 10, NO. 3, MARCH 1999 Constructing a Reliable Test&Set Bit Frank Stomp and Gadi Taubenfeld AbstractÐThe problem of computing with faulty

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

Fork Sequential Consistency is Blocking

Fork Sequential Consistency is Blocking Fork Sequential Consistency is Blocking Christian Cachin Idit Keidar Alexander Shraer May 14, 2008 Abstract We consider an untrusted server storing shared data on behalf of clients. We show that no storage

More information

A Skiplist-based Concurrent Priority Queue with Minimal Memory Contention

A Skiplist-based Concurrent Priority Queue with Minimal Memory Contention A Skiplist-based Concurrent Priority Queue with Minimal Memory Contention Jonatan Lindén and Bengt Jonsson Uppsala University, Sweden December 18, 2013 Jonatan Lindén 1 Contributions Motivation: Improve

More information

Concurrent Data Structures Concurrent Algorithms 2016

Concurrent Data Structures Concurrent Algorithms 2016 Concurrent Data Structures Concurrent Algorithms 2016 Tudor David (based on slides by Vasileios Trigonakis) Tudor David 11.2016 1 Data Structures (DSs) Constructs for efficiently storing and retrieving

More information

Fork Sequential Consistency is Blocking

Fork Sequential Consistency is Blocking Fork Sequential Consistency is Blocking Christian Cachin Idit Keidar Alexander Shraer Novembe4, 008 Abstract We consider an untrusted server storing shared data on behalf of clients. We show that no storage

More information

arxiv: v1 [cs.pl] 20 Aug 2018

arxiv: v1 [cs.pl] 20 Aug 2018 1 Every Data Structure Deserves Lock-Free Memory Reclamation NACHSHON COHEN, EPFL, Switzerland arxiv:1808.06348v1 [cs.pl] 20 Aug 2018 Memory-management support for lock-free data structures is well known

More information

A Non-Blocking Concurrent Queue Algorithm

A Non-Blocking Concurrent Queue Algorithm A Non-Blocking Concurrent Queue Algorithm Bruno Didot bruno.didot@epfl.ch June 2012 Abstract This report presents a new non-blocking concurrent FIFO queue backed by an unrolled linked list. Enqueue and

More information

Nesting-Safe Recoverable Linearizability: Modular Constructions for Non-Volatile Memory

Nesting-Safe Recoverable Linearizability: Modular Constructions for Non-Volatile Memory Nesting-Safe Recoverable Linearizability: Modular Constructions for Non-Volatile Memory Hagit Attiya Department of Computer Science, Technion hagit@cs.technion.ac.il Ohad Ben-Baruch Department of Computer

More information

A Wait-free Multi-word Atomic (1,N) Register for Large-scale Data Sharing on Multi-core Machines

A Wait-free Multi-word Atomic (1,N) Register for Large-scale Data Sharing on Multi-core Machines A Wait-free Multi-word Atomic (1,N) Register for Large-scale Data Sharing on Multi-core Machines Mauro Ianni, Alessandro Pellegrini DIAG Sapienza Università di Roma, Italy Email: {mianni,pellegrini}@dis.uniroma1.it

More information

Experience with Model Checking Linearizability

Experience with Model Checking Linearizability Experience with Model Checking Linearizability Martin Vechev, Eran Yahav, and Greta Yorsh IBM T.J. Watson Research Center Non-blocking concurrent algorithms offer significant performance advantages, but

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

6.852: Distributed Algorithms Fall, Class 21

6.852: Distributed Algorithms Fall, Class 21 6.852: Distributed Algorithms Fall, 2009 Class 21 Today s plan Wait-free synchronization. The wait-free consensus hierarchy Universality of consensus Reading: [Herlihy, Wait-free synchronization] (Another

More information

From Lock-Free to Wait-Free: Linked List. Edward Duong

From Lock-Free to Wait-Free: Linked List. Edward Duong From Lock-Free to Wait-Free: Linked List Edward Duong Outline 1) Outline operations of the locality conscious linked list [Braginsky 2012] 2) Transformation concept from lock-free -> wait-free [Timnat

More information

Stamp-it: A more Thread-efficient, Concurrent Memory Reclamation Scheme in the C++ Memory Model

Stamp-it: A more Thread-efficient, Concurrent Memory Reclamation Scheme in the C++ Memory Model Stamp-it: A more Thread-efficient, Concurrent Memory Reclamation Scheme in the C++ Memory Model Manuel Pöter TU Wien, Faculty of Informatics Vienna, Austria manuel@manuel-poeter.at Jesper Larsson Träff

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

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

Leveraging Transitive Relations for Crowdsourced Joins*

Leveraging Transitive Relations for Crowdsourced Joins* Leveraging Transitive Relations for Crowdsourced Joins* Jiannan Wang #, Guoliang Li #, Tim Kraska, Michael J. Franklin, Jianhua Feng # # Department of Computer Science, Tsinghua University, Brown University,

More information

Hierarchical PLABs, CLABs, TLABs in Hotspot

Hierarchical PLABs, CLABs, TLABs in Hotspot Hierarchical s, CLABs, s in Hotspot Christoph M. Kirsch ck@cs.uni-salzburg.at Hannes Payer hpayer@cs.uni-salzburg.at Harald Röck hroeck@cs.uni-salzburg.at Abstract Thread-local allocation buffers (s) are

More information

Linearizability of Persistent Memory Objects

Linearizability of Persistent Memory Objects Linearizability of Persistent Memory Objects Michael L. Scott Joint work with Joseph Izraelevitz & Hammurabi Mendes www.cs.rochester.edu/research/synchronization/ Workshop on the Theory of Transactional

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

A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm

A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm Appears as Technical Memo MIT/LCS/TM-590, MIT Laboratory for Computer Science, June 1999 A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm Miguel Castro and Barbara Liskov

More information

A Simple Optimistic skip-list Algorithm

A Simple Optimistic skip-list Algorithm A Simple Optimistic skip-list Algorithm Maurice Herlihy Brown University & Sun Microsystems Laboratories Yossi Lev Brown University & Sun Microsystems Laboratories yosef.lev@sun.com Victor Luchangco Sun

More information

A simple correctness proof of the MCS contention-free lock. Theodore Johnson. Krishna Harathi. University of Florida. Abstract

A simple correctness proof of the MCS contention-free lock. Theodore Johnson. Krishna Harathi. University of Florida. Abstract A simple correctness proof of the MCS contention-free lock Theodore Johnson Krishna Harathi Computer and Information Sciences Department University of Florida Abstract Mellor-Crummey and Scott present

More information

CS 167 Final Exam Solutions

CS 167 Final Exam Solutions CS 167 Final Exam Solutions Spring 2018 Do all questions. 1. [20%] This question concerns a system employing a single (single-core) processor running a Unix-like operating system, in which interrupts are

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

The Relative Power of Synchronization Methods

The Relative Power of Synchronization Methods Chapter 5 The Relative Power of Synchronization Methods So far, we have been addressing questions of the form: Given objects X and Y, is there a wait-free implementation of X from one or more instances

More information

Eliminating Synchronization Bottlenecks Using Adaptive Replication

Eliminating Synchronization Bottlenecks Using Adaptive Replication Eliminating Synchronization Bottlenecks Using Adaptive Replication MARTIN C. RINARD Massachusetts Institute of Technology and PEDRO C. DINIZ University of Southern California This article presents a new

More information

On the Importance of Synchronization Primitives with Low Consensus Numbers

On the Importance of Synchronization Primitives with Low Consensus Numbers On the Importance of Synchronization Primitives with Low Consensus Numbers ABSTRACT Pankaj Khanchandani ETH Zurich kpankaj@ethz.ch The consensus number of a synchronization primitive is the maximum number

More information

Scalable Correct Memory Ordering via Relativistic Programming

Scalable Correct Memory Ordering via Relativistic Programming Scalable Correct Memory Ordering via Relativistic Programming Josh Triplett Portland State University josh@joshtriplett.org Philip W. Howard Portland State University pwh@cs.pdx.edu Paul E. McKenney IBM

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

Wait-Free Regular Storage from Byzantine Components

Wait-Free Regular Storage from Byzantine Components Wait-Free Regular Storage from Byzantine Components Ittai Abraham Gregory Chockler Idit Keidar Dahlia Malkhi July 26, 2006 Abstract We consider the problem of implementing a wait-free regular register

More information

Performance of memory reclamation for lockless synchronization

Performance of memory reclamation for lockless synchronization J. Parallel Distrib. Comput. 67 (27) 127 1285 www.elsevier.com/locate/jpdc Performance of memory reclamation for lockless synchronization Thomas E. Hart a,,1, Paul E. McKenney b, Angela Demke Brown a,

More information

Design of Concurrent and Distributed Data Structures

Design of Concurrent and Distributed Data Structures METIS Spring School, Agadir, Morocco, May 2015 Design of Concurrent and Distributed Data Structures Christoph Kirsch University of Salzburg Joint work with M. Dodds, A. Haas, T.A. Henzinger, A. Holzer,

More information

Thin Locks: Featherweight Synchronization for Java

Thin Locks: Featherweight Synchronization for Java Thin Locks: Featherweight Synchronization for Java D. Bacon 1 R. Konuru 1 C. Murthy 1 M. Serrano 1 Presented by: Calvin Hubble 2 1 IBM T.J. Watson Research Center 2 Department of Computer Science 16th

More information

Concurrency. Glossary

Concurrency. Glossary Glossary atomic Executing as a single unit or block of computation. An atomic section of code is said to have transactional semantics. No intermediate state for the code unit is visible outside of the

More information

Mutual Exclusion Algorithms with Constant RMR Complexity and Wait-Free Exit Code

Mutual Exclusion Algorithms with Constant RMR Complexity and Wait-Free Exit Code Mutual Exclusion Algorithms with Constant RMR Complexity and Wait-Free Exit Code Rotem Dvir 1 and Gadi Taubenfeld 2 1 The Interdisciplinary Center, P.O.Box 167, Herzliya 46150, Israel rotem.dvir@gmail.com

More information

Runtime. The optimized program is ready to run What sorts of facilities are available at runtime

Runtime. The optimized program is ready to run What sorts of facilities are available at runtime Runtime The optimized program is ready to run What sorts of facilities are available at runtime Compiler Passes Analysis of input program (front-end) character stream Lexical Analysis token stream Syntactic

More information

A ThreadScan: Automatic and Scalable Memory Reclamation

A ThreadScan: Automatic and Scalable Memory Reclamation A ThreadScan: Automatic and Scalable Memory Reclamation DAN ALISTARH, ETH Zurich WILLIAM LEISERSON, MIT ALEXANDER MATVEEV, MIT NIR SHAVIT, MIT 1. INTRODUCTION An important principle for data structure

More information

Concurrent Manipulation of Dynamic Data Structures in OpenCL

Concurrent Manipulation of Dynamic Data Structures in OpenCL Concurrent Manipulation of Dynamic Data Structures in OpenCL Henk Mulder University of Twente P.O. Box 217, 7500AE Enschede The Netherlands h.mulder-1@student.utwente.nl ABSTRACT With the emergence of

More information

Kernel Korner AEM: A Scalable and Native Event Mechanism for Linux

Kernel Korner AEM: A Scalable and Native Event Mechanism for Linux Kernel Korner AEM: A Scalable and Native Event Mechanism for Linux Give your application the ability to register callbacks with the kernel. by Frédéric Rossi In a previous article [ An Event Mechanism

More information

Hoard: A Fast, Scalable, and Memory-Efficient Allocator for Shared-Memory Multiprocessors

Hoard: A Fast, Scalable, and Memory-Efficient Allocator for Shared-Memory Multiprocessors Hoard: A Fast, Scalable, and Memory-Efficient Allocator for Shared-Memory Multiprocessors Emery D. Berger Robert D. Blumofe femery,rdbg@cs.utexas.edu Department of Computer Sciences The University of Texas

More information

Garbage Collection (2) Advanced Operating Systems Lecture 9

Garbage Collection (2) Advanced Operating Systems Lecture 9 Garbage Collection (2) Advanced Operating Systems Lecture 9 Lecture Outline Garbage collection Generational algorithms Incremental algorithms Real-time garbage collection Practical factors 2 Object Lifetimes

More information

k-abortable Objects: Progress under High Contention

k-abortable Objects: Progress under High Contention k-abortable Objects: Progress under High Contention Naama Ben-David 1, David Yu Cheng Chan 2, Vassos Hadzilacos 2, and Sam Toueg 2 Carnegie Mellon University 1 University of Toronto 2 Outline Background

More information

Semi-Passive Replication in the Presence of Byzantine Faults

Semi-Passive Replication in the Presence of Byzantine Faults Semi-Passive Replication in the Presence of Byzantine Faults HariGovind V. Ramasamy Adnan Agbaria William H. Sanders University of Illinois at Urbana-Champaign 1308 W. Main Street, Urbana IL 61801, USA

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

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali Self Stabilization CS553 Distributed Algorithms Prof. Ajay Kshemkalyani by Islam Ismailov & Mohamed M. Ali Introduction There is a possibility for a distributed system to go into an illegitimate state,

More information

Concurrent Objects and Linearizability

Concurrent Objects and Linearizability Chapter 3 Concurrent Objects and Linearizability 3.1 Specifying Objects An object in languages such as Java and C++ is a container for data. Each object provides a set of methods that are the only way

More information

Software-Controlled Multithreading Using Informing Memory Operations

Software-Controlled Multithreading Using Informing Memory Operations Software-Controlled Multithreading Using Informing Memory Operations Todd C. Mowry Computer Science Department University Sherwyn R. Ramkissoon Department of Electrical & Computer Engineering University

More information

Self-stabilizing Byzantine Digital Clock Synchronization

Self-stabilizing Byzantine Digital Clock Synchronization Self-stabilizing Byzantine Digital Clock Synchronization Ezra N. Hoch, Danny Dolev and Ariel Daliot The Hebrew University of Jerusalem We present a scheme that achieves self-stabilizing Byzantine digital

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

Concurrent Counting using Combining Tree

Concurrent Counting using Combining Tree Final Project Report by Shang Wang, Taolun Chai and Xiaoming Jia Concurrent Counting using Combining Tree 1. Introduction Counting is one of the very basic and natural activities that computers do. However,

More information

Extensions to Barrelfish Asynchronous C

Extensions to Barrelfish Asynchronous C Extensions to Barrelfish Asynchronous C Michael Quigley michaelforrquigley@gmail.com School of Computing, University of Utah October 27, 2016 1 Abstract The intent of the Microsoft Barrelfish Asynchronous

More information

Practical Lock-Free and Wait-Free LL/SC/VL Implementations Using 64-Bit CAS

Practical Lock-Free and Wait-Free LL/SC/VL Implementations Using 64-Bit CAS Practical Lock-Free and Wait-Free LL/SC/VL Implementations Using 64-Bit CAS Maged M. Michael IBM Thomas J. Watson Research Center, Yorktown Heights, New York, USA Abstract. The idealsemantics of the instructions

More information

General Objectives: To understand the process management in operating system. Specific Objectives: At the end of the unit you should be able to:

General Objectives: To understand the process management in operating system. Specific Objectives: At the end of the unit you should be able to: F2007/Unit5/1 UNIT 5 OBJECTIVES General Objectives: To understand the process management in operating system Specific Objectives: At the end of the unit you should be able to: define program, process and

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

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

15 418/618 Project Final Report Concurrent Lock free BST

15 418/618 Project Final Report Concurrent Lock free BST 15 418/618 Project Final Report Concurrent Lock free BST Names: Swapnil Pimpale, Romit Kudtarkar AndrewID: spimpale, rkudtark 1.0 SUMMARY We implemented two concurrent binary search trees (BSTs): a fine

More information

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Java platform. Applets and applications. Java programming language: facilities and foundation. Memory management

More information

Design Patterns for Real-Time Computer Music Systems

Design Patterns for Real-Time Computer Music Systems Design Patterns for Real-Time Computer Music Systems Roger B. Dannenberg and Ross Bencina 4 September 2005 This document contains a set of design patterns for real time systems, particularly for computer

More information

A Concurrent Bidirectional Linear Probing Algorithm

A Concurrent Bidirectional Linear Probing Algorithm A Concurrent Bidirectional Linear Probing Algorithm Towards a Concurrent Compact Hash Table Steven van der Vegt University of Twente The Netherlands s.vandervegt@student.utwente.nl ABSTRACT Hash tables

More information

Operating Systems. Deadlock. Lecturer: William Fornaciari Politecnico di Milano Homel.deib.polimi.

Operating Systems. Deadlock. Lecturer: William Fornaciari Politecnico di Milano Homel.deib.polimi. Politecnico di Milano Operating Systems Lecturer: William Fornaciari Politecnico di Milano william.fornaciari@elet.polimi.it Homel.deib.polimi.it/fornacia Summary What is a resource Conditions for deadlock

More information

Module 1. Introduction:

Module 1. Introduction: Module 1 Introduction: Operating system is the most fundamental of all the system programs. It is a layer of software on top of the hardware which constitutes the system and manages all parts of the system.

More information

Understanding and Effectively Preventing the ABA Problem in Descriptor-based Lock-free Designs

Understanding and Effectively Preventing the ABA Problem in Descriptor-based Lock-free Designs Understanding and Effectively Preventing the ABA Problem in Descriptor-based Lock-free Designs Damian Dechev Sandia National Laboratories Scalable Computing R & D Department Livermore, CA 94551-0969 ddechev@sandia.gov

More information

arxiv: v1 [cs.dc] 8 May 2017

arxiv: v1 [cs.dc] 8 May 2017 Towards Reduced Instruction Sets for Synchronization arxiv:1705.02808v1 [cs.dc] 8 May 2017 Rati Gelashvili MIT gelash@mit.edu Alexander Spiegelman Technion sashas@tx.technion.ac.il Idit Keidar Technion

More information

Linearizability of Persistent Memory Objects

Linearizability of Persistent Memory Objects Linearizability of Persistent Memory Objects Michael L. Scott Joint work with Joseph Izraelevitz & Hammurabi Mendes www.cs.rochester.edu/research/synchronization/ Compiler-Driven Performance Workshop,

More information

Adaptive Lock. Madhav Iyengar < >, Nathaniel Jeffries < >

Adaptive Lock. Madhav Iyengar < >, Nathaniel Jeffries < > Adaptive Lock Madhav Iyengar < miyengar@andrew.cmu.edu >, Nathaniel Jeffries < njeffrie@andrew.cmu.edu > ABSTRACT Busy wait synchronization, the spinlock, is the primitive at the core of all other synchronization

More information

Even Better DCAS-Based Concurrent Deques

Even Better DCAS-Based Concurrent Deques Even Better DCAS-Based Concurrent Deques David L. Detlefs, Christine H. Flood, Alexander T. Garthwaite, Paul A. Martin, Nir N. Shavit, and Guy L. Steele Jr. Sun Microsystems Laboratories, 1 Network Drive,

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