Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

You Don't Know Jack about Shared Variables or Memory Models

You Don't Know Jack about Shared Variables or Memory Models COMPUTER ARCHITECTURE You Don ™t Know Jack about Shared Variables or Memory Models Data races are evil Sarita V. Adve, University of Illinois at Urbana-Champaign Hans-J. Boehm, HP Laboratories A Google search for œThreads are evil  generates 18,000 hits, but threads ”evil or not ”are ubiquitous. Almost all of the processes running on a modern Windows PC use them. Software threads are typically how programmers get machines with multiple cores to work together to solve problems faster. And often they are what allow user interfaces to remain responsive while the application performs a background calculation. Threads are multiple programs running at the same time but sharing variables. Typically, every thread can access all of the application ™s memory. Shared variables are either the core strength of threads or the root of their evil, depending on your perspective. They allow threads to communicate easily and quickly, but they also make it possible for threads to get in each other ™s way. Although shared variables are at the core of most programs, even experts are often confused about the rules for using them. Consider the following simple example. INCREMENTING A COUNTER To implement a function incr that increments a http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Queue Association for Computing Machinery

You Don't Know Jack about Shared Variables or Memory Models

Queue , Volume 9 (12) – Dec 1, 2011

Loading next page...
 
/lp/association-for-computing-machinery/you-don-t-know-jack-about-shared-variables-or-memory-models-0F0HhDZ2Qj

References

References for this paper are not available at this time. We will be adding them shortly, thank you for your patience.

Publisher
Association for Computing Machinery
Copyright
Copyright © 2011 by ACM Inc.
ISSN
1542-7730
DOI
10.1145/2076796.2088916
Publisher site
See Article on Publisher Site

Abstract

COMPUTER ARCHITECTURE You Don ™t Know Jack about Shared Variables or Memory Models Data races are evil Sarita V. Adve, University of Illinois at Urbana-Champaign Hans-J. Boehm, HP Laboratories A Google search for œThreads are evil  generates 18,000 hits, but threads ”evil or not ”are ubiquitous. Almost all of the processes running on a modern Windows PC use them. Software threads are typically how programmers get machines with multiple cores to work together to solve problems faster. And often they are what allow user interfaces to remain responsive while the application performs a background calculation. Threads are multiple programs running at the same time but sharing variables. Typically, every thread can access all of the application ™s memory. Shared variables are either the core strength of threads or the root of their evil, depending on your perspective. They allow threads to communicate easily and quickly, but they also make it possible for threads to get in each other ™s way. Although shared variables are at the core of most programs, even experts are often confused about the rules for using them. Consider the following simple example. INCREMENTING A COUNTER To implement a function incr that increments a

Journal

QueueAssociation for Computing Machinery

Published: Dec 1, 2011

There are no references for this article.