Parallel exception handling in Cilk
Author(s)
Yin, Grace Q.(Grace Qingyang)
Download1193031905-MIT.pdf (363.8Kb)
Other Contributors
Massachusetts Institute of Technology. Department of Electrical Engineering and Computer Science.
Advisor
Charles E. Leiserson and Tao B. Schardl.
Terms of use
Metadata
Show full item recordAbstract
With the end of Moore's law, parallel programming is more important than ever. Significant effort has gone into supporting parallelism in existing serial languages and making parallel programming more accessible. However, adapting useful and expressive features of serial languages to a parallel environment can be challenging. This thesis addresses the challenges of parallelizing one such feature - exception handling. This thesis presents the Cilk exception handling (CilkEH) protocol for handling parallel exceptions in Cilk programs. Because exception handling involves jumping out of the normal control flow of a program, the core challenge of parallel exception handling is properly synchronizing parallel tasks that have thrown. CilkEH is a remarkably simple protocol that takes advantage of the internals of serial C++ exception handling to elegantly synchronize tasks that throw. We integrate CilkEH into OpenCilk, an open-source platform to support Cilk multithreaded programming. Our implementation correctly handles exceptions thrown in parallel without imposing any restrictions on the programmer, and benchmark results show that the overhead of CilkEH for programs that do not throw is minimal. Implementing CilkEH requires an astonishingly small number of lines of code - fewer than 600 lines split between a 4000-line runtime and a 500,000-line compiler.
Description
Thesis: M. Eng., Massachusetts Institute of Technology, Department of Electrical Engineering and Computer Science, May, 2020 Cataloged from the official PDF of thesis. Includes bibliographical references (pages 59-61).
Date issued
2020Department
Massachusetts Institute of Technology. Department of Electrical Engineering and Computer SciencePublisher
Massachusetts Institute of Technology
Keywords
Electrical Engineering and Computer Science.