ProXC++ - A CSP-inspired Concurrency Library for Modern C++ with Dynamic Multithreading for Multi-Core Architectures
Master thesis
Permanent lenke
http://hdl.handle.net/11250/2453094Utgivelsesdato
2017Metadata
Vis full innførselSamlinger
Sammendrag
Ever since mass-market processors transitioned from single-core to multi-core architectures, software could no longer rely on an increase in sequential performance for an increase in software performance. Now, developing high-performance software on multi-core architectures requires to exploit the apparent parallelism. Concurrent programming is the main tool for developing such software, but programmers struggle to create correct and scalable concurrent systems.
It is argued in this thesis Communicating Sequential Processes (CSP) is a great model for creating correct and expressive concurrent systems. Further, it is argued combining the parallel nature of CSP with a dynamic multithreaded runtime system sets the foundation for creating high-performant and scalable software for multi-core architectures.
This thesis details the development of ProXC++ - a CSP-influenced concurrency library for modern C++, which is built around dynamic multithreading. Dynamic multithreading is implemented as a collection of lightweight processes cooperatively scheduled on multiple schedulers. The runtime system follows the hybrid threading model, where processes are implemented as user-threads, and each runtime scheduler runs on its own kernel-thread. Runtime schedulers employ randomized work stealing for load balancing ready processes to idle schedulers.
A detailed design and implementation of ProXC++ is presented, with focus on dynamic multithreading. New and existing algorithms are described, mostly for how process management, inter-process communication and synchronization is administered by the runtime schedulers. A series of benchmarks with various degrees of parallelism is performed. ProXC++ yields promising performance results, however some issues with the work stealing algorithm are highlighted and discussed.
ProXC++ is concluded as a successful project, providing expressive and correct abstractions for creating concurrent programs and is able to exploit the parallelism in multi-core architectures. Some potential candidates for future work is outlined, including implementing support for networking.
The ProXC++ library is publicly released as an open-source project with an MIT license, available free of charge on GitHub.