skip to main content
10.1145/1806596.1806603acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Safe programmable speculative parallelism

Published: 05 June 2010 Publication History

Abstract

Execution order constraints imposed by dependences can serialize computation, preventing parallelization of code and algorithms. Speculating on the value(s) carried by dependences is one way to break such critical dependences. Value speculation has been used effectively at a low level, by compilers and hardware. In this paper, we focus on the use of speculation by programmers as an algorithmic paradigm to parallelize seemingly sequential code.
We propose two new language constructs, speculative composition and speculative iteration. These constructs enable programmers to declaratively express speculative parallelism in programs: to indicate when and how to speculate, increasing the parallelism in the program, without concerning themselves with mundane implementation details.
We present a core language with speculation constructs and mutable state and present a formal operational semantics for the language. We use the semantics to define the notion of a correct speculative execution as one that is equivalent to a non-speculative execution. In general, speculation requires a runtime mechanism to undo the effects of speculative computation in the case of mis predictions. We describe a set of conditions under which such rollback can be avoided. We present a static analysis that checks if a given program satisfies these conditions. This allows us to implement speculation efficiently, without the overhead required for rollbacks.
We have implemented the speculation constructs as a C# library, along with the static checker for safety. We present an empirical evaluation of the efficacy of this approach to parallelization.

References

[1]
What's new in Beta 2 for the Task Parallel Library. In blogs.msdn.com, 2009.
[2]
Martìn Abadi, Andrew Birrell, Tim Harris, and Michael Isard. Semantics of transactional memory and automatic mutual exclusion. In Proc. of POPL, pages 63--74, 2008.
[3]
Krste Asanovic, Rastislav Bodik, James Demmel, Tony Keaveny, Kurt Keutzer, John Kubiatowicz, Nelson Morgan, David Patterson, Koushik Sen, John Wawrzynek, David Wessel, and Katherine Yelick. A view of the parallel computing landscape. Communications of ACM, 2009.
[4]
Brian D. Carlstrom, Austen McDonald, Hassan Chafi, JaeWoong Chung, Chi Cao Minh, Christos Kozyrakis, and Kunle Olukotun. The atomos transactional programming language. SIGPLAN Not., 41(6):1--13, 2006.
[5]
Marcelo Cintra and Josep Torrellas. Eliminating squashes through learning cross-thread violations in speculative parallelization for multiprocessors. In Proc. of HPCA, page 43, Washington, DC, USA, 2002. IEEE Computer Society.
[6]
Chen Ding, Xipeng Shen, Kirk Kelsey, Chris Tice, Ruke Huang, and Chengliang Zhang. Software behavior oriented parallelization. In Proc. of PLDI, pages 223--234, 2007.
[7]
Tim Harris, Simon Marlow, Simon Peyton-Jones, and Maurice Herlihy. Composable memory transactions. In Proc. of PPoPP, pages 48--60, New York, NY, USA, 2005. ACM.
[8]
Christopher Grant Jones, Rose Liu, Leo Meyerovich, Krste Asanovic, and Rastislav Bodik. Parallelizing the web browser. In Proc. of HOTPAR, 2009.
[9]
Blake Kaplan. Speculative parsing patch. In bugzilla.mozilla.org, 2009.
[10]
Shmuel Tomi Klein and Yair Wiseman. Parallel huffman decoding with applications to jpeg files. Journal of Computing, 46(5):487--497, 2003.
[11]
Milind Kulkarni, Keshav Pingali, Bruce Walter, Ganesh Ramanarayanan, Kavita Bala, and L. Paul Chew. Optimistic parallelism requires abstractions. In PLDI, pages 211--222, 2007.
[12]
Butler W. Lampson. Lazy and speculative execution in computer systems. In Proc. of ICFP, pages 1--2, New York, NY, USA, 2008. ACM.
[13]
Mikko H. Lipasti, Christopher B. Wilkerson, and John Paul Shen. Value locality and load value prediction. In Proc. of ASPLOS, pages 138--147, 1996.
[14]
Daniel Luchaup, Randy Smith, Cristian Estan, and Somesh Jha. Multi-byte regular expression matching with speculation. In Proc. of RAID, pages 284--303, 2009.
[15]
Katherine F. Moore and Dan Grossman. High-level small-step operational semantics for transactions. In Proc. of POPL, pages 51--62, 2008.
[16]
Jeffrey T. Oplinger, David L. Heine, and Monica S. Lam. In search of speculative thread-level parallelism. In Proc. of PACT, page 303, Washington, DC, USA, 1999. IEEE Computer Society.
[17]
Carlos García Quinones, Carlos Madriles, Jesús Sánchez, Pedro Marcuello, Antonio González, and Dean M. Tullsen. Mitosis compiler: an infrastructure for speculative threading based on pre-computation slices. SIGPLAN Not., 40(6):269--279, 2005.
[18]
Easwaran Raman, Neil Vachharajani, Ram Rangan, and David I. August. Spice: speculative parallel iteration chunk execution. In Proc. of CGO, pages 175--184, 2008.
[19]
Alexandru Salcianu and Martin C. Rinard. Purity and side effect analysis for java programs. In Proc. of VMCAI, pages 199--215, 2005.
[20]
J. Gregory Steffan, Christopher B. Colohan, Antonia Zhai, and Todd C. Mowry. Improving value communication for thread-level speculation. In Proc. of HPCA, page 65, Washington, DC, USA, 2002. IEEE Computer Society.
[21]
Dean M. Tullsen and John S. Seng. Storageless value prediction using prior register values. In Proc. of ISCA, pages 270--279, 1999.
[22]
Christoph von Praun, Luis Ceze, and Calin Cascaval. Implicit parallelism with ordered transactions. In Proc. of PPoPP, pages 79--89, 2007.
[23]
G. Weikum and Gottfried Vossen. Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery. Morgan Kaufmann, 2002.
[24]
Adam Welc, Suresh Jagannathan, and Antony Hosking. Safe futures for java. In Proc. of OOPSLA, pages 439--453, New York, NY, USA, 2005. ACM.
[25]
E. E. Witte, R. D. Chamberlain, and M. A. Franklin. Parallel simulated annealing using speculative computation. IEEE Trans. Parallel Distrib. Syst., 2(4):483--494, 1991.

Cited By

View all
  • (2024)Reversibility in Process Calculi with Nondeterminism and ProbabilitiesTheoretical Aspects of Computing – ICTAC 202410.1007/978-3-031-77019-7_15(251-271)Online publication date: 22-Nov-2024
  • (2022)Predictive Execution of Parallel Simulations in Hard Real-Time SystemsIEEE Transactions on Computers10.1109/TC.2022.3147416(1-1)Online publication date: 2022
  • (2022)GSpecPal: Speculation-Centric Finite State Machine Parallelization on GPUs2022 IEEE International Parallel and Distributed Processing Symposium (IPDPS)10.1109/IPDPS53621.2022.00053(481-491)Online publication date: May-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2010
514 pages
ISBN:9781450300193
DOI:10.1145/1806596
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 45, Issue 6
    PLDI '10
    June 2010
    496 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1809028
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 June 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. purity
  2. rollback freedom
  3. safety
  4. speculative parallelism
  5. value speculation

Qualifiers

  • Research-article

Conference

PLDI '10
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)14
  • Downloads (Last 6 weeks)0
Reflects downloads up to 30 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Reversibility in Process Calculi with Nondeterminism and ProbabilitiesTheoretical Aspects of Computing – ICTAC 202410.1007/978-3-031-77019-7_15(251-271)Online publication date: 22-Nov-2024
  • (2022)Predictive Execution of Parallel Simulations in Hard Real-Time SystemsIEEE Transactions on Computers10.1109/TC.2022.3147416(1-1)Online publication date: 2022
  • (2022)GSpecPal: Speculation-Centric Finite State Machine Parallelization on GPUs2022 IEEE International Parallel and Distributed Processing Symposium (IPDPS)10.1109/IPDPS53621.2022.00053(481-491)Online publication date: May-2022
  • (2021)Scalable FSM parallelization via path fusion and higher-order speculationProceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3445814.3446705(887-901)Online publication date: 19-Apr-2021
  • (2021)Quantifying the Semantic Gap Between Serial and Parallel Programming2021 IEEE International Symposium on Workload Characterization (IISWC)10.1109/IISWC53511.2021.00024(151-162)Online publication date: Nov-2021
  • (2020)Combining SIMD and Many/Multi-core Parallelism for Finite-state Machines with Enumerative SpeculationACM Transactions on Parallel Computing10.1145/33997147:3(1-26)Online publication date: 21-Jun-2020
  • (2020)Challenging Sequential Bitstream Processing via Principled Bitwise SpeculationProceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3373376.3378461(607-621)Online publication date: 9-Mar-2020
  • (2020)Scaling out speculative execution of finite-state machines with parallel mergeProceedings of the 25th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming10.1145/3332466.3374524(160-172)Online publication date: 19-Feb-2020
  • (2017)Combining SIMD and Many/Multi-core Parallelism for Finite State Machines with Enumerative SpeculationACM SIGPLAN Notices10.1145/3155284.301876052:8(179-191)Online publication date: 26-Jan-2017
  • (2017)Gradual synthesis for static parallelization of single-pass array-processing programsACM SIGPLAN Notices10.1145/3140587.306238252:6(572-585)Online publication date: 14-Jun-2017
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media