Font Size: a A A

Compiler transformations to generate reentrant C programs to assist software parallelization

Posted on:2010-04-14Degree:M.SType:Thesis
University:University of KansasCandidate:Smith, Adam RFull Text:PDF
GTID:2448390002488943Subject:Computer Science
Abstract/Summary:
As we move through the multi-core era into the many-core era it becomes obvious that thread-based programming is here to stay. This trend in the development of general purpose hardware is augmented by the fact that while writing sequential programs is considered a non-trivial task, writing parallel applications to take advantage of the advances in the number of cores in a processor severely complicates the process. Writing parallel applications requires programs and functions to be reentrant. Therefore, we cannot use globals and statics. However, globals and statics are useful in certain contexts. Globals allow an easy programming mechanism to share data between several functions. Statics provide the only mechanism of data hiding in C for variables that are global in scope.;Writing parallel programs restricts users from using globals and statics in their programs, as doing so would make the program non-reentrant. Moreover, there is a large existing legacy code base of sequential programs that are non-reentrant, since they rely on statics and globals. Several of these sequential programs display significant amounts of data parallelism by operating on independent chunks of input data, and therefore can be easily converted into parallel versions to exploit multi-core processors. Indeed, several such programs have been manually converted into parallel versions. However, manually eliminating all globals and statics to make the program reentrant is tedious, time-consuming, and error-prone. In this paper we describe a system to provide a semi-automated mechanism for users to still be able to use statics and globals in their programs, and to let the compiler automatically convert them into their semantically-equivalent reentrant versions enabling their parallelization later.
Keywords/Search Tags:Programs, Parallel, Reentrant
Related items