05.08.2014 Views

here - Stefan-Marr.de

here - Stefan-Marr.de

here - Stefan-Marr.de

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.3. Common Problems for the Implementation of Concurrency Abstractions<br />

when the benchmark uses pass-by-reference, which brings the runtime down<br />

to ca. 17sec.<br />

Approaches based on type systems or other forms of static verification enable<br />

the safe passing of references, and thus, bring significant performance<br />

advantages. However, a type system comes with additional implementation<br />

complexity, its guarantees do not reach beyond language boundaries, and are<br />

typically voi<strong>de</strong>d by the use of reflection.<br />

Again, these problems are universal and apply to communicating isolate concepts,<br />

e. g., CSP [Hoare, 1978] and APGAS [Saraswat et al., 2010] concepts as<br />

well (cf. Sec. 2.4.4). For instance, JCSP [Welch et al., 2007] does not guarantee<br />

safe messaging for reference types. The by-value semantics is only given<br />

for primitive types, and channels that are based on network socket communication.<br />

The main concerns are performance, similar to actor-oriented<br />

frameworks on the JVM and frameworks like Retlang 19 on top of the CLI.<br />

X10 [Charles et al., 2005] as one example for an APGAS language explicitly<br />

specifies that <strong>de</strong>ep copying is performed [Saraswat et al., 2012]. Similarly, the<br />

application domains specified by the CLI rely on marshalling, i. e., either <strong>de</strong>ep<br />

copying or far references, to enforce safe messaging and state encapsulation.<br />

Thus, the implementation of properties such as safe messaging can become a<br />

performance issue when the VM does not provi<strong>de</strong> mechanisms to support it,<br />

which often leads to language and library implementers giving up on <strong>de</strong>sirable<br />

semantic properties.<br />

Conclusion Following this discussion, the implementation of isolation on<br />

today’s multi-language VMs is challenging and thus, it often remains unenforced<br />

or only partially supported. Solutions for enforcing isolation imply<br />

tra<strong>de</strong>offs between performance and implementation complexity. Furthermore,<br />

mechanisms to handle reflection and the interaction with other languages remain<br />

uncommon.<br />

Note that the notion of ownership is central for the <strong>de</strong>finition of isolation.<br />

Furthermore, a mechanism for ownership transfer between entities can simplify<br />

the implementation of safe messaging greatly.<br />

3.3.3. Scheduling Guarantees<br />

The second issue i<strong>de</strong>ntified by Karmani et al. is that the overall progress guarantee<br />

of an actor systems assumes fair scheduling. In systems without fair<br />

scheduling, actors can be starved of computation time and block the overall<br />

19 http://co<strong>de</strong>.google.com/p/retlang/<br />

75

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

Saved successfully!

Ooh no, something went wrong!