05.08.2014 Views

here - Stefan-Marr.de

here - Stefan-Marr.de

here - Stefan-Marr.de

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2. Context and Motivation<br />

section. For instance, the implementation of barriers that are used in parallel<br />

programming rely on concurrent programming concepts [<strong>Marr</strong> et al., 2010b].<br />

Thus, in many cases <strong>de</strong>velopers need to combine parallel and concurrent programming<br />

techniques to account for their requirements.<br />

It remains to be mentioned that similar <strong>de</strong>finitions have been proposed<br />

before. For instance, in the teaching material of Grossman [2012]. 9 The <strong>de</strong>finitions<br />

given by this dissertation use a different wording to avoid the implication<br />

of performance and the concrete notions of threads, since concurrent<br />

and parallel programming are more general.<br />

Rationale These two <strong>de</strong>finitions are partially based on the following observations:<br />

Classic parallel programming approaches such as single program multiple<br />

data (SPMD) techniques based on MPI [Message Passing Interface Forum,<br />

2009] or shared memory approaches such as OpenMP [OpenMP Architecture<br />

Review Board, 2011] are used to <strong>de</strong>compose problems to use multiple computational<br />

resources such as processor cores. All activities in such programs<br />

collaborate to calculate the overall result. They are coordinated by the use of<br />

barriers and collective operations to make an abstraction of concrete data <strong>de</strong>pen<strong>de</strong>ncies<br />

requiring all activities to actively participate, which is trivial in a<br />

single program mo<strong>de</strong>l. However, even contemporary APGAS languages such<br />

as X10 (cf. Sec. 2.4.4) provi<strong>de</strong> barriers [Shirako et al., 2008], while advocating<br />

for fork/join-like programming mo<strong>de</strong>ls that encourage a much higher <strong>de</strong>gree<br />

of dynamics than in the SPMD mo<strong>de</strong>l.<br />

In addition to the use of barriers, the fork/join-based programming mo<strong>de</strong>l<br />

in the style of Cilk [Blumofe et al., 1995] is strongly based on the notion of<br />

collaborating activities. It uses the notion of recursive divi<strong>de</strong>-and-conquer to<br />

expose the parallelism in a problem. One important assumption that is in<strong>here</strong>nt<br />

to this mo<strong>de</strong>l is that the recursive <strong>de</strong>vision makes an abstraction of all data<br />

<strong>de</strong>pen<strong>de</strong>ncies. Thus, it is assumed that the resulting program is data-race-free<br />

when it synchronizes correctly on completion of its sub-tasks. The fork/join<br />

mo<strong>de</strong>l itself does not provi<strong>de</strong> any means to coordinate access to shared resources<br />

other than by synchronizing on the completion of sub-tasks. Thus, all<br />

activities have to collaborate and it is assumed that no in<strong>de</strong>pen<strong>de</strong>nt activities<br />

in the system interact in any way with the fork/join computation. T<strong>here</strong>fore,<br />

correctness of the computation is ensured by construction and does not need<br />

to be enforced at runtime.<br />

9 The key notions are also mentioned in Grossman and An<strong>de</strong>rson [2012].<br />

22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!