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. Which Concepts for Concurrent and Parallel Progr. does a VM need to Support?<br />

concept relevant for concurrency abstractions is hardly enforceable on any<br />

of the surveyed platforms today. The main reason for weak enforceability is<br />

the ubiquitous availability and use of reflection. Since immutability and other<br />

concurrency properties are essential for correctness of co<strong>de</strong>, reflection needs<br />

to be flexible and allow <strong>de</strong>velopers to circumvent only the necessary subset<br />

of language guarantees for a given use case.<br />

In conclusion, a unifying substrate needs to support some form of managed<br />

state and managed execution. This is necessary to enable custom<br />

semantics for execution and state access and a powerful VM interface. This dissertation<br />

refers to managed state as the notion of reifying access to state, i. e.,<br />

reading and writing of object fields or global variables. Managed execution<br />

is the notion of reifying execution of methods and primitives.<br />

A mechanism satisfying these two notions is supposed to enable at least<br />

the implementation of asynchronous invocation, isolation, scheduling policies, immutability,<br />

ownership, and interception of primitives.<br />

The discussion of for instance active objects, CSP, and actors, showed that<br />

concurrency policies, i. e., for instance access restrictions can be based on the<br />

notion of ownership of objects. To support such concurrency policies, a unifying<br />

substrate needs to complement managed state and managed execution<br />

with ownership. A mechanism satisfying this requirement enables<br />

the implementation of isolation and supports concepts such as Clojure actors<br />

which allow reads from arbitrary entities but restrict write access to the owning<br />

entity.<br />

To enforce scheduling policies, this dissertation requires a VM to support<br />

some form of preemptive scheduling that will enable a higher prior thread to<br />

execute when necessary to ensure fairness. Blocking primitives remain problematic<br />

however, because they can block the scheduling logic from executing.<br />

Thus, primitives have to be manageable as we required it for execution in<br />

general. This aspect is covered by managed execution.<br />

The required enforcement of guarantees against reflection needs to be flexible.<br />

As explained with the example of an ORM system, reflection needs to<br />

be enabled to obey concurrency semantics (cf. Sec. 3.3.5), while the ORM still<br />

needs to be able to circumvent access restrictions like private modifiers for<br />

fields to fulfill its purpose. Thus, such an implementation needs to be able<br />

to specify whether an operation is supposed to be executed with enforcement<br />

enabled or disabled. To conclu<strong>de</strong>, a VM needs to provi<strong>de</strong> the notion of<br />

controlled enforcement. A mechanism that satisfies this notion has to<br />

enable for instance reflection over private fields of an objects while its concurrency<br />

properties are maintained. In the context of an STM system, this would<br />

84

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

Saved successfully!

Ooh no, something went wrong!