Speculative parallelization needs rigor: probabilistic analysis for optimal speculation of finite-state machine applications

Finite-State Machine (FSM) applications are important for many domains. But FSM computation is inherently sequential, making such applications notoriously difficult to parallelize. Most prior methods address the problem through speculations on simple heuristics, offering limited applicability and inconsistent speedups. This paper provides some principled understanding of FSM parallelization, and offers the first disciplined way to exploit application-specific information to inform speculations for parallelization. Through a series of rigorous analysis, it presents a probabilistic model that captures the relations between speculative executions and the properties of the target FSM and its inputs. With the formulation, it proposes two model-based speculation schemes that automatically customize themselves with the suitable configurations to maximize the parallelization benefits. This rigorous treatment yields near-linear speedup on applications that stateof-the-art techniques can barely accelerate.

[1]  François Baccelli,et al.  An Asynchronous Parallel Interpreter for Arithmetic Expressions and Its Evaluation , 1986, IEEE Transactions on Computers.

[2]  Matteo Frigo,et al.  The implementation of the Cilk-5 multithreaded language , 1998, PLDI.

[3]  Steven K. Thompson,et al.  Sample Size for Estimating Multinomial Proportions , 1987 .

[4]  Samuel Williams,et al.  The Landscape of Parallel Computing Research: A View from Berkeley , 2006 .

[5]  Harry Bunt,et al.  Advances in Probabilistic and Other Parsing Technologies , 2000 .

[6]  Boris Alexeev Minimal DFA for testing divisibility , 2004, J. Comput. Syst. Sci..

[7]  Stephanie Forrest,et al.  Learning DFA representations of HTTP for protecting web applications , 2007, Comput. Networks.

[8]  Ming Yang,et al.  GPU-based NFA implementation for memory efficient high speed regular expression matching , 2012, PPoPP '12.

[9]  Diego R. Llanos Ferraris,et al.  New Scheduling Strategies for Randomized Incremental Algorithms in the Context of Speculative Parallelization , 2007, IEEE Transactions on Computers.

[10]  Leo A. Meyerovich,et al.  Parallelizing the web browser , 2009 .

[11]  Chen Ding,et al.  Software behavior oriented parallelization , 2007, PLDI '07.

[12]  Ying Zhang,et al.  Speculative p-DFAs for parallel XML parsing , 2009, 2009 International Conference on High Performance Computing (HiPC).

[13]  G. Ramalingam,et al.  Safe programmable speculative parallelism , 2010, PLDI '10.

[14]  Rajiv Gupta,et al.  Copy or Discard execution model for speculative parallelization on multicores , 2008, 2008 41st IEEE/ACM International Symposium on Microarchitecture.

[15]  Shmuel Tomi Klein,et al.  Parallel Huffman Decoding with Applications to JPEG Files , 2003, Comput. J..

[16]  Martín Abadi,et al.  Semantics of transactional memory and automatic mutual exclusion , 2008, POPL '08.

[17]  Wei Lu,et al.  A Parallel Approach to XML Parsing , 2006, 2006 7th IEEE/ACM International Conference on Grid Computing.

[18]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[19]  Rajiv Gupta,et al.  SpiceC: scalable parallelism via implicit copying and explicit commit , 2011, PPoPP '11.

[20]  Dean M. Tullsen,et al.  Mitosis compiler: an infrastructure for speculative threading based on pre-computation slices , 2005, PLDI '05.

[21]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[22]  Mark A. Franklin,et al.  Parallel Simulated Annealing using Speculative Computation , 1991, IEEE Trans. Parallel Distributed Syst..

[23]  Antonia Zhai,et al.  The STAMPede approach to thread-level speculation , 2005, TOCS.

[24]  David I. August,et al.  Speculative parallelization using software multi-threaded transactions , 2010, ASPLOS 2010.

[25]  Charles N. Fischer On parsing context free languages in parallel environments. , 1975 .

[26]  Jianhui Li,et al.  A Hybrid Parallel Processing for XML Parsing and Schema Validation , 2008 .

[27]  Somesh Jha,et al.  Multi-byte Regular Expression Matching with Speculation , 2009, RAID.

[28]  Keshav Pingali,et al.  Optimistic parallelism requires abstractions , 2007, PLDI '07.

[29]  François Baccelli,et al.  On parsing arithmetic expressions in a multiprocessing environment , 2004, Acta Informatica.

[30]  Bo Wu,et al.  Probabilistic Models towards Optimal Speculation of Finite State Machine Applications , 2011 .