Abstract
Finite State Machine (FSM) is the backbone of an important class of applications in many domains. Its parallelization has been extremely difficult due to inherent strong dependences in the computation. Recently, principled speculation shows good promise to solve the problem. However, the reliance on offline training makes the approach inconvenient to adopt and hard to apply to many practical FSM applications, which often deal with a large variety of inputs different from training inputs. This work presents an assembly of techniques that completely remove the needs for offline training. The techniques include a set of theoretical results on inherent properties of FSMs, and two newly designed dynamic optimizations for efficient FSM characterization. The new techniques, for the first time, make principle speculation applicable on the fly, and enables swift, automatic configuration of speculative parallelizations to best suit a given FSM and its current input. They eliminate the fundamental barrier for practical adoption of principle speculation for FSM parallelization. Experiments show that the new techniques give significantly higher speedups for some difficult FSM applications in the presence of input changes.
- M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of transactional memory and automatic mutual exclusion. In Proceedings of ACM Symposium on Principles of Programming Languages, 2008. Google Scholar
Digital Library
- A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison Wesley, 2nd edition, August 2006. Google Scholar
Digital Library
- K. Asanovic, R. Bodik, B. Catanzaro, J. Gebis, P. Husbands, K. Keutzer, D. Patterson, W. Plishker, J. Shalf, S. Williams, and K. Yelick. The landscape of parallel computing research: A view from berkeley. Technical Report UCB/EECS-2006--18, University of California at Berkele, 2006.Google Scholar
- F. Baccelli and T. Fleury. On parsing arithmetic expressions in a multiprocessing environment. Acta Inf., 17: 287--310, 1982. Google Scholar
Digital Library
- F. Baccelli and P. Mussi. An asynchronous parallel interpreter for arithmetic expressions and its evaluation. IEEE Trans. Computers, 35 (3): 245--256, 1986. Google Scholar
Digital Library
- B. Carlstrom, A. McDonald, H. Chafi, J. Chung, C. Minh, C. Kozyrakis, and K. Olukotun. The atomos transactional programming langauges. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, 2006. Google Scholar
Digital Library
- P. Charles, C. Grothoff, V. Saraswat, C. Donawa, A. Kielstra, K. Ebcioglu, C. von Praun, and V. Sarkar. X10: an object-oriented approach to non-uniform cluster computing. In OOPSLA, 2005. Google Scholar
Digital Library
- C. Ding, X. Shen, K. Kelsey, C. Tice, R. Huang, and C. Zhang. Software behavior-oriented parallelization. In PLDI, 2007. Google Scholar
Digital Library
- M. Feng, R. Gupta, and Y. Hu. Spicec: Scalable parallelism via implicit copying and explicit commit. In Proceedings of the ACM SIGPLAN Symposium on Principles Practice of Parallel Programming, 2011. Google Scholar
Digital Library
- C. N. Fischer. On Parsing Context Free Languages in Parallel Environments. PhD thesis, Cornell University, 1975. Google Scholar
Digital Library
- M. Frigo, C. E. Leiserson, and K. H. Randall. The implementation of the Cilk-5 multithreaded language. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, 1998. Google Scholar
Digital Library
- M. Herlihy and J. E. Moss. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the International Symposium on High Performance Computer Architecture (HPCA), 1993. Google Scholar
Digital Library
- K. Ingham, A. Somayaji, J. Burge, and S. Forrest. Learning dfa representations of http for protecting web applications. Computer Networks, 51 (5): 1239--1255, Apr. 2007. Google Scholar
Digital Library
- C. Jones, R. Liu, L. Meyerovich, K. Asanovic, and R. Bodik. Parallelizing the web browser. In HotPar, 2009. Google Scholar
Digital Library
- B. Kaplan. Speculative parsing path.texttthttp://bugzilla.mozilla.org.Google Scholar
- S. Klein and Y. Wiseman. Parallel huffman decoding with applications to jpeg files. Jounal of Computing, 46 (5), 2003.Google Scholar
- M. Kulkarni, K. Pingali, B. Walter, G. Ramanarayanan, K. Bala, and L. Chew. Optimistic parallelism requires abstractions. In PLDI, 2007. Google Scholar
Digital Library
- R. E. Ladner and M. J. Fischer. Parallel prefix computation. J. ACM, 27 (4): 831--838, Oct. 1980. ISSN 0004--5411. Google Scholar
Digital Library
- D. Llanos, D. Orden, and B. Palop. New scheduling strategies for randomized incremental algorithms in the context of speculative parallelization. IEEE Transactions on Computers, 2007. Google Scholar
Digital Library
- W. Lu, K. Chiu, and Y. Pan. A parallel approach to xml parsing. In Proceedings of the 7th IEEE/ACM International Conference on Grid Computing, GRID '06, pages 223--230, 2006. Google Scholar
Digital Library
- D. Luchaup, R. Smith, C. Estan, and S. Jha. Multi-byte regular expression matching with speculation. In RAID, 2009. Google Scholar
Digital Library
- T. Mytkowicz, M. Musuvathi, and W. Schulte. Data-parallel finite-state machines. In ASPLOS '14: Proceedings of 19th International Conference on Architecture Support for Programming Languages and Operating Systems. ACM Press, 2014. Google Scholar
Digital Library
- P. Prabhu, G. Ramalingam, and K. Vaswani. Safe programmable speculative parallelism. In Proceedings of ACM SIGPLAN Conference on Programming Languages Design and Implementation, 2010. Google Scholar
Digital Library
- C. Quinones, C. Madriles, J. Sanchez, P. Marcuello, A. Gonzalez, and D. M. Tullsen. Mitosis compiler: an infrastructure for speculative threading based on pre-computation slices. In PLDI, 2005. Google Scholar
Digital Library
- A. Raman, H. Kim, T. R. Mason, T. B. Jablin, and D. I. August. Speculative parallelization using software multi-threaded transactions. In Proceedings of the international conference on Architectural support for programming languages and operating systems, 2010. Google Scholar
Digital Library
- S. Sandberg. Homing and synchronizing sequences. Model-based testing of reactive systems, 2005.Google Scholar
- J. G. Steffan, C. Colohan, A. Zhai, and T. C. Mowry. The STAMPede approach to thread-level speculation. ACM Transactions on Computer Systems, 23 (3): 253--300, 2005. Google Scholar
Digital Library
- C. Tian, M. Feng, V. Nagarajan, and R. Gupta. Copy or discard execution model for speculative parallelization on multicores. In Proceedings of the International Symposium on Microarchitecture, 2008. Google Scholar
Digital Library
- M. V. Volkov. Synchronizing automata and the 'ern' conjecture. Lecture Notes in Computer Science, pages 11--27, 2008. Google Scholar
Digital Library
- E. Witte, R. Chamberlain, and M. Franklin. Parallel simulated annealing using speculative computation. IEEE Transactions on Parallel and Distributed Systems, 2 (4): 483--494, 1991. Google Scholar
Digital Library
- Z. Zhao, B. Wu, and X. Shen. Challenging the "embarrassingly sequential": Parallelizing finite state machine-based computations through principled speculation. In ASPLOS '14: Proceedings of 19th International Conference on Architecture Support for Programming Languages and Operating Systems. ACM Press, 2014. Google Scholar
Digital Library
- Y. Zu, M. Yang, Z. Xu, L. Wang, X. Tian, K. Peng, and Q. Dong. Gpu-based nfa implementation for memory efficient high speed regular expression matching. In PPoPP '12: Proceedings of the ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 129--140, 2009. Google Scholar
Digital Library
Index Terms
On-the-Fly Principled Speculation for FSM Parallelization
Recommendations
Scalable FSM parallelization via path fusion and higher-order speculation
ASPLOS '21: Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating SystemsFinite-state machine (FSM) is a fundamental computation model used by many applications. However, FSM execution is known to be “embarrassingly sequential” due to the state dependences among transitions. Existing solutions leverage enumerative or ...
Challenging the "embarrassingly sequential": parallelizing finite state machine-based computations through principled speculation
ASPLOS '14: Proceedings of the 19th international conference on Architectural support for programming languages and operating systemsFinite-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 ...
MicroSpec: Speculation-Centric Fine-Grained Parallelization for FSM Computations
PACT '16: Proceedings of the 2016 International Conference on Parallel Architectures and CompilationFinite state machines (FSMs) are basic computation models that play essential roles in many applications. Enabling efficient parallel FSM execution is critical to the performance of these applications. However, they are very challenging to parallelize ...







Comments