skip to main content
10.1145/1215995.1215997acmconferencesArticle/Chapter ViewAbstractPublication PagessospConference Proceedingsconference-collections
Article

Atomicity and visibility in tiny embedded systems

Published:22 October 2006Publication History

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.

References

  1. Andrei Alexandrescu, Hans Boehm, Kevlin Henney, Doug Lea, and Bill Pugh. Memory model for multithreaded C++, September 2004. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1680.pdf.Google ScholarGoogle Scholar
  2. AVR C Runtime Library Project. AVR libc Frequently Asked Questions, 2006. http://www.nongnu.org/avr-libc/user-manual/FAQ.html.Google ScholarGoogle Scholar
  3. Hans-Juergen Boehm. Threads cannot be implemented as a library. In Proc. of the ACM SIGPLAN 2005 Conf. on Programming Language Design and Implementation (PLDI), pages 261--268, Chicago, IL, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Crossbow Technology, Inc. http://xbow.com.Google ScholarGoogle Scholar
  5. David Gay, Phil Levis, Robert von Behren, Matt Welsh, Eric Brewer, and David Culler. The nesC language: A holistic approach to networked embedded systems. In Proc. of the Conf. on Programming Language Design and Implementation (PLDI), pages 1--11, San Diego, CA, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, and Kristofer Pister. System architecture directions for networked sensors. In Proc. of the 9th Intl. Conf. on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 93--104, Cambridge, MA, November 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Herb Sutter. Prism: A principle-based sequential memory model for microsoft native code platforms, July 2006. Draft, available from http://www.gotw.ca/memmodel/Prism%20-%20draft%200.8.pdf.Google ScholarGoogle Scholar
  8. Ben L. Titzer, Daniel Lee, and Jens Palsberg. Avrora: Scalable sensor network simulation with precise timing. In Proc. of the 4th Intl. Conf. on Information Processing in Sensor Networks (IPSN), Los Angeles, CA, April 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Linus Torvalds. Anti-volatile diatribe, July 2006. Linux-Kernel Mailing List posting, http://lkml.org/lkml/2006/7/6/159.Google ScholarGoogle Scholar

Index Terms

  1. Atomicity and visibility in tiny embedded systems

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              PLOS '06: Proceedings of the 3rd workshop on Programming languages and operating systems: linguistic support for modern operating systems
              October 2006
              64 pages
              ISBN:1595935770
              DOI:10.1145/1215995

              Copyright © 2006 ACM

              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 must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 22 October 2006

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • Article

              Acceptance Rates

              Overall Acceptance Rate17of32submissions,53%

              Upcoming Conference

              SOSP '24

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader