Atomicity and visibility in tiny embedded systems

  • Authors:
  • John Regehr;Nathan Cooprider;David Gay

  • Affiliations:
  • University of Utah;University of Utah;Intel Research Berkeley

  • Venue:
  • Proceedings of the 3rd workshop on Programming languages and operating systems: linguistic support for modern operating systems
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Visibility is a property of a programming language's memory model that determines when values stored by one concurrent computation become visible to other computations. Our work exploits the insight that in nesC, a C-like language with explicit atomicity, the traditional way of ensuring timely visibility---volatile variables---can be entirely avoided. This is advantageous because the volatile qualifier is a notorious source of programming errors and misunderstandings. Furthermore, the volatile qualifier hurts performance by inhibiting many more optimizations than are necessary to ensure visibility. In this paper we extend the semantics of nesC's atomic statements to include a visibility guarantee, we show two ways that these semantics can be implemented, and we also show that our better implementation has no drawbacks in terms of resource usage.