Atomicity

14,000,000 Leading Edge Experts on the ideXlab platform

Scan Science and Technology

Contact Leading Edge Experts & Companies

Scan Science and Technology

Contact Leading Edge Experts & Companies

The Experts below are selected from a list of 1911099 Experts worldwide ranked by ideXlab platform

Mojtaba Mehrara - One of the best experts on this subject based on the ideXlab platform.

  • transactional memory with strong Atomicity using off the shelf memory protection hardware
    ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, 2009
    Co-Authors: Martin Abadi, Tim Harris, Mojtaba Mehrara
    Abstract:

    This paper introduces a new way to provide strong Atomicity in an implementation of transactional memory. Strong Atomicity lets us offer clear semantics to programs, even if they access the same locations inside and outside transactions. It also avoids differences between hardware-implemented transactions and software-implemented ones. Our approach is to use off-the-shelf page-level memory protection hardware to detect conflicts between normal memory accesses and transactional ones. This page-level mechanism ensures correctness but gives poor performance because of the costs of manipulating memory protection settings and receiving notifications of access violations. However, in practice, we show how a combination of careful object placement and dynamic code update allows us to eliminate almost all of the protection changes. Existing implementations of strong Atomicity in software rely on detecting conflicts by conservatively treating some non-transactional accesses as short transactions. In contrast, our page-level mechanism lets us be less conservative about how non-transactional accesses are treated; we avoid changes to non-transactional code until a possible conflict is detected dynamically, and we can respond to phase changes where a given instruction sometimes generates conflicts and sometimes does not. We evaluate our implementation with C# versions of many of the STAMP benchmarks, and show how it performs within 25% of an implementation with weak Atomicity on all the benchmarks we have studied. It avoids pathological cases in which other implementations of strong Atomicity perform poorly.

  • PPOPP - Transactional memory with strong Atomicity using off-the-shelf memory protection hardware
    Proceedings of the 14th ACM SIGPLAN symposium on Principles and practice of parallel programming - PPoPP '09, 2009
    Co-Authors: Martin Abadi, Tim Harris, Mojtaba Mehrara
    Abstract:

    This paper introduces a new way to provide strong Atomicity in an implementation of transactional memory. Strong Atomicity lets us offer clear semantics to programs, even if they access the same locations inside and outside transactions. It also avoids differences between hardware-implemented transactions and software-implemented ones. Our approach is to use off-the-shelf page-level memory protection hardware to detect conflicts between normal memory accesses and transactional ones. This page-level mechanism ensures correctness but gives poor performance because of the costs of manipulating memory protection settings and receiving notifications of access violations. However, in practice, we show how a combination of careful object placement and dynamic code update allows us to eliminate almost all of the protection changes. Existing implementations of strong Atomicity in software rely on detecting conflicts by conservatively treating some non-transactional accesses as short transactions. In contrast, our page-level mechanism lets us be less conservative about how non-transactional accesses are treated; we avoid changes to non-transactional code until a possible conflict is detected dynamically, and we can respond to phase changes where a given instruction sometimes generates conflicts and sometimes does not. We evaluate our implementation with C# versions of many of the STAMP benchmarks, and show how it performs within 25% of an implementation with weak Atomicity on all the benchmarks we have studied. It avoids pathological cases in which other implementations of strong Atomicity perform poorly.

Martin Abadi - One of the best experts on this subject based on the ideXlab platform.

  • transactional memory with strong Atomicity using off the shelf memory protection hardware
    ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, 2009
    Co-Authors: Martin Abadi, Tim Harris, Mojtaba Mehrara
    Abstract:

    This paper introduces a new way to provide strong Atomicity in an implementation of transactional memory. Strong Atomicity lets us offer clear semantics to programs, even if they access the same locations inside and outside transactions. It also avoids differences between hardware-implemented transactions and software-implemented ones. Our approach is to use off-the-shelf page-level memory protection hardware to detect conflicts between normal memory accesses and transactional ones. This page-level mechanism ensures correctness but gives poor performance because of the costs of manipulating memory protection settings and receiving notifications of access violations. However, in practice, we show how a combination of careful object placement and dynamic code update allows us to eliminate almost all of the protection changes. Existing implementations of strong Atomicity in software rely on detecting conflicts by conservatively treating some non-transactional accesses as short transactions. In contrast, our page-level mechanism lets us be less conservative about how non-transactional accesses are treated; we avoid changes to non-transactional code until a possible conflict is detected dynamically, and we can respond to phase changes where a given instruction sometimes generates conflicts and sometimes does not. We evaluate our implementation with C# versions of many of the STAMP benchmarks, and show how it performs within 25% of an implementation with weak Atomicity on all the benchmarks we have studied. It avoids pathological cases in which other implementations of strong Atomicity perform poorly.

  • PPOPP - Transactional memory with strong Atomicity using off-the-shelf memory protection hardware
    Proceedings of the 14th ACM SIGPLAN symposium on Principles and practice of parallel programming - PPoPP '09, 2009
    Co-Authors: Martin Abadi, Tim Harris, Mojtaba Mehrara
    Abstract:

    This paper introduces a new way to provide strong Atomicity in an implementation of transactional memory. Strong Atomicity lets us offer clear semantics to programs, even if they access the same locations inside and outside transactions. It also avoids differences between hardware-implemented transactions and software-implemented ones. Our approach is to use off-the-shelf page-level memory protection hardware to detect conflicts between normal memory accesses and transactional ones. This page-level mechanism ensures correctness but gives poor performance because of the costs of manipulating memory protection settings and receiving notifications of access violations. However, in practice, we show how a combination of careful object placement and dynamic code update allows us to eliminate almost all of the protection changes. Existing implementations of strong Atomicity in software rely on detecting conflicts by conservatively treating some non-transactional accesses as short transactions. In contrast, our page-level mechanism lets us be less conservative about how non-transactional accesses are treated; we avoid changes to non-transactional code until a possible conflict is detected dynamically, and we can respond to phase changes where a given instruction sometimes generates conflicts and sometimes does not. We evaluate our implementation with C# versions of many of the STAMP benchmarks, and show how it performs within 25% of an implementation with weak Atomicity on all the benchmarks we have studied. It avoids pathological cases in which other implementations of strong Atomicity perform poorly.

Scott D Stoller - One of the best experts on this subject based on the ideXlab platform.

  • have detecting Atomicity violations via integrated dynamic and static analysis
    Fundamental Approaches to Software Engineering, 2009
    Co-Authors: Qi Chang Chen, Li Qiang Wang, Zijiang Yang, Scott D Stoller
    Abstract:

    The reality of multi-core hardware has made concurrent programs pervasive. Unfortunately, writing correct concurrent programs is difficult. Atomicity violation, which is caused by concurrently executing code unexpectedly violating the Atomicity of a code segment, is one of the most common concurrency errors. However, Atomicity violations are hard to find using traditional testing and debugging techniques. This paper presents a hybrid approach that integrates static and dynamic analyses to attack this problem. We first perform static analysis to obtain summaries of synchronizations and accesses to shared variables. The static summaries are then instantiated with runtime values during dynamic executions to speculatively approximate the behaviors of branches that are not taken. Compared to dynamic analysis, the hybrid approach is able to detect Atomicity violations in unexecuted parts of the code. Compared to static analysis, the hybrid approach produces fewer false alarms. We implemented this hybrid analysis in a tool called HAVE that detects Atomicity violations in multi-threaded Java programs. Experiments on several benchmarks and real-world applications demonstrate promising results.

  • accurate and efficient runtime detection of Atomicity errors in concurrent programs
    ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, 2006
    Co-Authors: Li Qiang Wang, Scott D Stoller
    Abstract:

    Atomicity is an important correctness condition for concurrent systems. Informally, Atomicity is the property that every concurrent execution of a set of transactions is equivalent to some serial execution of the same transactions. In multi-threaded programs, executions of procedures (or methods) can be regarded as transactions. Correctness in the presence of concurrency often requires Atomicity of these transactions. Tools that automatically detect Atomicity violations can uncover subtle errors that are hard to find with traditional debugging and testing techniques.This paper presents new algorithms for runtime (dynamic) detection of violations of conflict-Atomicity and view-Atomicity, which are analogous to conflict-serializability and view-serializability in database systems. In these algorithms, the recorded events are formed into a graph with edges representing the synchronization within each transaction and possible interactions between transactions. We give conditions on the graph that imply conflict-Atomicity and view-Atomicity. Experiments show that these new algorithms are more efficient in most experiments and are more accurate than previous algorithms with comparable asymptotic complexity.

  • runtime analysis of Atomicity for multithreaded programs
    IEEE Transactions on Software Engineering, 2006
    Co-Authors: Li Qiang Wang, Scott D Stoller
    Abstract:

    Atomicity is a correctness condition for concurrent systems. Informally, Atomicity is the property that every concurrent execution of a set of transactions is equivalent to some serial execution of the same transactions. In multithreaded programs, executions of procedures (or methods) can be regarded as transactions. Correctness in the presence of concurrency typically requires Atomicity of these transactions. Tools that automatically detect Atomicity violations can uncover subtle errors that are hard to find with traditional debugging and testing techniques. This paper describes two algorithms for runtime detection of Atomicity violations and compares their cost and effectiveness. The reduction-based algorithm checks Atomicity based on commutativity properties of events in a trace; the block-based algorithm efficiently represents the relevant information about a trace as a set of blocks (i.e., pairs of events plus associated synchronizations) and checks Atomicity by comparing each block with other blocks. To improve the efficiency and accuracy of both algorithms, we incorporate a multilockset algorithm for checking data races, dynamic escape analysis, and happen-before analysis. Experiments show that both algorithms are effective in finding Atomicity violations. The block-based algorithm is more accurate but more expensive than the reduction-based algorithm.

  • optimized run time race detection and Atomicity checking using partial discovered types
    Automated Software Engineering, 2005
    Co-Authors: Rahul Agarwal, Li Qiang Wang, Amit Sasturkar, Scott D Stoller
    Abstract:

    Concurrent programs are notorious for containing errors that are difficult to reproduce and diagnose. Two common kinds of concurrency errors are data races and Atomicity violations (informally, Atomicity means that executing methods concurrently is equivalent to executing them serially). Several static and dynamic (run-time) analysis techniques exist to detect potential races and Atomicity violations. Run-time checking may miss errors in unexecuted code and incurs significant run-time overhead. On the other hand, run-time checking generally produces fewer false alarms than static analysis; this is a significant practical advantage, since diagnosing all of the warnings from static analysis of large codebases may be prohibitively expensive.This paper explores the use of static analysis to significantly decrease the overhead of run-time checking. Our approach is based on a type system for analyzing data races and Atomicity. A type discovery algorithm is used to obtain types for as much of the program as possible (complete type inference for this type system is NP-hard, and parts of the program might be untypable). Warnings from the typechecker are used to identify parts of the program from which run-time checking can safely be omitted. The approach is completely automatic, scalable to very large programs, and significantly reduces the overhead of run-time checking for data races and Atomicity violations.

  • automated type based analysis of data races and Atomicity
    ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, 2005
    Co-Authors: Amit Sasturkar, Li Qiang Wang, Rahul Agarwal, Scott D Stoller
    Abstract:

    Concurrent programs are notorious for containing errors that are difficult to reproduce and diagnose at run-time. This motivated the development of type systems that statically ensure the absence of some common kinds of concurrent programming errors including data races and Atomicity violations. A method is atomic if every execution of the concurrent program is equivalent to an execution in which the atomic method is executed without being interleaved with other concurrently executed methods. Atomicity is a common correctness requirement in concurrent programs; Atomicity violations may indicate incorrect synchronization. This paper presents Extended Parameterized Atomic Java (EPAJ), a type system for specifying and verifying Atomicity in Java programs. EPAJ combines Flanagan and Qadeer's Atomicity types [11] with a new and significantly more expressive type system for analyzing data races, called Extended Parameterized Race-Free Java (EPRFJ), allowing a more accurate analysis of Atomicity. The paper also presents a type discovery algorithm to automatically obtain EPRFJ types, and a static interprocedural type inference algorithm that, given EPRFJ types, infers Atomicity types. These algorithms can be incorporated into testing and debugging tools, benefiting users who know nothing about type systems. We report our experience with a prototype implementation.

Xiangyu Zhang - One of the best experts on this subject based on the ideXlab platform.

  • static detection of resource contention problems in server side scripts
    International Conference on Software Engineering, 2012
    Co-Authors: Yunhui Zheng, Xiangyu Zhang
    Abstract:

    With modern multi-core architectures, web applications are usually configured to serve multiple requests simultaneously by spawning multiple instances. These instances may access the same external resources such as database tables and files. Such contentions may become severe during peak time, leading to violations of Atomicity business logic. In this paper, we propose a novel static analysis that detects Atomicity violations of external operations for server side scripts. The analysis differs from traditional Atomicity violation detection techniques by focusing on external resources instead of shared memory. It consists of three components. The first one is an interprocedural and path-sensitive resource identity analysis that determines whether multiple operations access the same external resource, which is critical to identifying contentions. The second component infers pairs of external operations that should be executed atomically. Finally, violations are detected by reasoning about serializability of interleaved atomic pairs. Experimental results show that the analysis is highly effective in detecting Atomicity violations in real-world web apps.

  • ICSE - Static detection of resource contention problems in server-side scripts
    2012 34th International Conference on Software Engineering (ICSE), 2012
    Co-Authors: Yunhui Zheng, Xiangyu Zhang
    Abstract:

    With modern multi-core architectures, web applications are usually configured to serve multiple requests simultaneously by spawning multiple instances. These instances may access the same external resources such as database tables and files. Such contentions may become severe during peak time, leading to violations of Atomicity business logic. In this paper, we propose a novel static analysis that detects Atomicity violations of external operations for server side scripts. The analysis differs from traditional Atomicity violation detection techniques by focusing on external resources instead of shared memory. It consists of three components. The first one is an interprocedural and path-sensitive resource identity analysis that determines whether multiple operations access the same external resource, which is critical to identifying contentions. The second component infers pairs of external operations that should be executed atomically. Finally, violations are detected by reasoning about serializability of interleaved atomic pairs. Experimental results show that the analysis is highly effective in detecting Atomicity violations in real-world web apps.

Tim Harris - One of the best experts on this subject based on the ideXlab platform.

  • transactional memory with strong Atomicity using off the shelf memory protection hardware
    ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, 2009
    Co-Authors: Martin Abadi, Tim Harris, Mojtaba Mehrara
    Abstract:

    This paper introduces a new way to provide strong Atomicity in an implementation of transactional memory. Strong Atomicity lets us offer clear semantics to programs, even if they access the same locations inside and outside transactions. It also avoids differences between hardware-implemented transactions and software-implemented ones. Our approach is to use off-the-shelf page-level memory protection hardware to detect conflicts between normal memory accesses and transactional ones. This page-level mechanism ensures correctness but gives poor performance because of the costs of manipulating memory protection settings and receiving notifications of access violations. However, in practice, we show how a combination of careful object placement and dynamic code update allows us to eliminate almost all of the protection changes. Existing implementations of strong Atomicity in software rely on detecting conflicts by conservatively treating some non-transactional accesses as short transactions. In contrast, our page-level mechanism lets us be less conservative about how non-transactional accesses are treated; we avoid changes to non-transactional code until a possible conflict is detected dynamically, and we can respond to phase changes where a given instruction sometimes generates conflicts and sometimes does not. We evaluate our implementation with C# versions of many of the STAMP benchmarks, and show how it performs within 25% of an implementation with weak Atomicity on all the benchmarks we have studied. It avoids pathological cases in which other implementations of strong Atomicity perform poorly.

  • PPOPP - Transactional memory with strong Atomicity using off-the-shelf memory protection hardware
    Proceedings of the 14th ACM SIGPLAN symposium on Principles and practice of parallel programming - PPoPP '09, 2009
    Co-Authors: Martin Abadi, Tim Harris, Mojtaba Mehrara
    Abstract:

    This paper introduces a new way to provide strong Atomicity in an implementation of transactional memory. Strong Atomicity lets us offer clear semantics to programs, even if they access the same locations inside and outside transactions. It also avoids differences between hardware-implemented transactions and software-implemented ones. Our approach is to use off-the-shelf page-level memory protection hardware to detect conflicts between normal memory accesses and transactional ones. This page-level mechanism ensures correctness but gives poor performance because of the costs of manipulating memory protection settings and receiving notifications of access violations. However, in practice, we show how a combination of careful object placement and dynamic code update allows us to eliminate almost all of the protection changes. Existing implementations of strong Atomicity in software rely on detecting conflicts by conservatively treating some non-transactional accesses as short transactions. In contrast, our page-level mechanism lets us be less conservative about how non-transactional accesses are treated; we avoid changes to non-transactional code until a possible conflict is detected dynamically, and we can respond to phase changes where a given instruction sometimes generates conflicts and sometimes does not. We evaluate our implementation with C# versions of many of the STAMP benchmarks, and show how it performs within 25% of an implementation with weak Atomicity on all the benchmarks we have studied. It avoids pathological cases in which other implementations of strong Atomicity perform poorly.