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.

3. Which Concepts for Concurrent and Parallel Progr. does a VM need to Support?<br />

of the different actor properties are. The analysis in this dissertation concentrates<br />

on the issues that are relevant for multi-language VMs and disregards<br />

problems that are relevant for distributed systems only. The relevant actor<br />

properties for this discussion are insufficient guarantees with regard to isolation<br />

of state as well as with regard to scheduling guarantees. While Karmani<br />

et al. concentrated on actor-oriented frameworks, the analysis in this section<br />

shows that these actor properties are relevant for a wi<strong>de</strong>r range of concurrency<br />

abstractions.<br />

In addition to these problems, the analysis in this section inclu<strong>de</strong>s previously<br />

discussed issues related to immutability and reflection [<strong>Marr</strong> et al., 2011a].<br />

Supporting reliable immutability and enabling reflection while maintaining<br />

concurrency-related language guarantees lead to complex implementations of<br />

concurrency abstractions. This section <strong>de</strong>monstrates with examples that language<br />

implementers face a number of significant problems when they try to<br />

realize such concepts on top of today’s VMs. T<strong>here</strong>fore, these problems need<br />

to be consi<strong>de</strong>red in or<strong>de</strong>r to <strong>de</strong>termine the requirements for multi-language<br />

VMs with exten<strong>de</strong>d support for concurrent programming.<br />

3.3.2. Isolation<br />

Isolation, often also referred to as encapsulation, is a valuable property that enables<br />

local reasoning about the effects of operations since it clearly separates<br />

two entities from each other and enforces the use of explicit interfaces for<br />

interaction. It is of high relevance, because many concurrent programming<br />

concepts rely on strong isolation between entities in or<strong>de</strong>r to restrict the set<br />

of directly mutable entities and thus, limit the number of potential data races<br />

in a concurrent system. Karmani et al. make a distinction between state encapsulation<br />

and safe messaging to clarify the un<strong>de</strong>rlying problems.<br />

State Encapsulation Integrating the actor mo<strong>de</strong>l correctly with languages<br />

that have mutable state, e. g., conventional object-oriented languages, is a challenge.<br />

Sharing mutable state between actors violates the actor mo<strong>de</strong>l, because<br />

communication and interaction are supposed to be based on message-based<br />

communication only. T<strong>here</strong>fore, mutable state has to be owned by a single<br />

actor and any form of access needs to be restricted to its owner.<br />

Semantic Aspects See Lst. 3.1 for the example Karmani et al. use to illustrate<br />

the problem. The <strong>de</strong>picted Scala co<strong>de</strong> is supposed to implement a basic<br />

72

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

Saved successfully!

Ooh no, something went wrong!