MIT Libraries logoDSpace@MIT

MIT
View Item 
  • DSpace@MIT Home
  • MIT Libraries
  • MIT Theses
  • Graduate Theses
  • View Item
  • DSpace@MIT Home
  • MIT Libraries
  • MIT Theses
  • Graduate Theses
  • View Item
JavaScript is disabled for your browser. Some features of this site may not work without it.

Combining Task Parallelism and Multithreaded Concurrency

Author(s)
Pusapaty, Sai Sameer
Thumbnail
DownloadThesis PDF (1.780Mb)
Advisor
Leiserson, Charles E.
Terms of use
In Copyright - Educational Use Permitted Copyright MIT http://rightsstatements.org/page/InC-EDU/1.0/
Metadata
Show full item record
Abstract
In this thesis, I present Multicilk, a threads library based on C11 threads and the OpenCilk runtime for enabling task parallelism within multiple concurrent threads. With Multicilk, a programmer can parallelize threads in a multithreaded application simply by using Cilk independently within each thread. Without Multicilk, doing so violates the semantics that we expect in concurrent thread programming, leading to catastrophic failure of the application. No other existing combination of task-parallel system — including OpenMP, TBB, and TPL, and the various other implementations of Cilk — and threads library — including C11, C++11, Pthreads, and WinAPI threads — can parallelize multithreaded applications transparently and modularly. The key insight behind Multicilk recognizes that integrating task-parallel systems with multithreaded concurrency requires two layers of thread abstraction that are conflated in previous systems. Service threads implement the workers in the Cilk runtime system. But the Cilk computation itself, called a cilk, though implemented by many service threads, itself provides the abstraction of a single application thread to other threads within the multithreaded application, regardless of whether they are cilks. Multicilk employs a technique called impersonation to individual workers to act on behalf of the entire cilk, providing the same interface to the outside world as it would it were an ordinary thread. This powerful “two-layer-cake” abstraction enables ordinary multithreaded applications to be ported to a Cilk environment and parallelized in a straightforward and modular fashion. My Multicilk implementation for OpenCilk provides two thread libraries corresponding to the layers in the two-layer cake, as well as some modifications to the OpenCilk runtime system. The service-thread library is the standard glibc. The application-thread library was created by modifying eight glibc functions using 63 lines of source code and writing wrappers for four glibc functions using 115 lines of code, amounting to about half of the 25 functions in the C11 sublibrary of glibc. I wrote 180 lines of utility functions for threading and synchronization. The changes to OpenCilk amounted to 62 lines, also for threading and synchronization. In sum, I added or modified just over 400 lines of source code to implement Multicilk.
Date issued
2022-02
URI
https://hdl.handle.net/1721.1/143325
Department
Massachusetts Institute of Technology. Department of Electrical Engineering and Computer Science
Publisher
Massachusetts Institute of Technology

Collections
  • Graduate Theses

Browse

All of DSpaceCommunities & CollectionsBy Issue DateAuthorsTitlesSubjectsThis CollectionBy Issue DateAuthorsTitlesSubjects

My Account

Login

Statistics

OA StatisticsStatistics by CountryStatistics by Department
MIT Libraries
PrivacyPermissionsAccessibilityContact us
MIT
Content created by the MIT Libraries, CC BY-NC unless otherwise noted. Notify us about copyright concerns.