A Parallel Programming Model and Runtime System for Safe Event-based Parallel Programming

TitleA Parallel Programming Model and Runtime System for Safe Event-based Parallel Programming
Publication TypePhDThesis
Year of Publication2014
AuthorsBonetta, D.
Academic DepartmentUSI Faculty of Informatics
Number of Pages179
MonthSeptember
UniversityUSI
CityLugano, Switzerland
DegreePhD
KeywordsParallel JavaScript
Abstract

Recent trends in programming models for server-side development have shown an increasing popularity of event-based single-threaded programming models based on the combination of dynamic languages such as JavaScript and event-based runtime systems for asynchronous I/O management such as Node.JS. Reasons for the success of such models are the simplicity of the single-threaded event-based programming model as well as the growing popularity of the Cloud as a deployment platform for Web applications. Unfortunately, the popularity of single-threaded models comes at the price of performance and scalability, as single-threaded event-based models present limitations when parallel processing is needed, and traditional approaches to concurrency such as threads and locks don't play well with event-based systems.

This Dissertation proposes a programming model and a runtime system to overcome such limitations by enabling single-threaded event-based applications with support for speculative parallel execution.
The model, called Parallel event loop, has the goal of bringing parallel execution to the domain of single-threaded event-based programming without relaxing the main characteristics of the single-threaded model, and therefore providing developers with the impression of a safe, single-threaded, runtime. Rather than supporting only pure single-threaded programming, however, the parallel event loop can also be used to derive safe, high-level, parallel programming models characterized by a strong compatibility with single-threaded runtimes. We describe three distinct implementations of speculative runtimes enabling the parallel execution of event-based applications. The first implementation we describe is a pessimistic runtime system based on locks to implement speculative parallelization. The second and the third implementations are based on two distinct optimistic runtimes using software transactional memory. Each of the implementations supports the parallelization of applications written using an asynchronous single-threaded programming style, and each of them enables applications to benefit from parallel execution.

Citation Keyphd:2014:daniele.bonetta
Full Text