Thread Safety through Partitions and Effect Agreements

  • Authors:
  • Nicholas D. Matsakis;Thomas R. Gross

  • Affiliations:
  • ETH Zurich,;ETH Zurich,

  • Venue:
  • Languages and Compilers for Parallel Computing
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper describes a safety analysis for a multithreaded system based upon transactional memory. The analysis guarantees that shared data is always read and written from within a transaction, while allowing for unsynchronized access to thread-local and (shared) read-only data, as well as the migration of data between threads. The analysis is based on a type and effect system for object-oriented programs called partitions . Programmers specify a partitioning of the heap into disjoint regions at a field-level granularity, and then use this partitioning to enforce safety properties in their programs. Our flow-sensitive effect system requires methods to disclose which partitions of the heap they will read or write, and also allows them to specify an effect agreement which can be used to limit the conditions in which a method can be called.