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.

6.5. Discussion<br />

Method Invocation Reification The ability to manage execution is essential<br />

for active objects, actors, CSP, vats, and others. To this end, the OMOP<br />

provi<strong>de</strong>s the #requestExecOf:on:with:lkup: intercession handler. The<br />

case studies in Sec. 6.2 <strong>de</strong>monstrate how it can be used to customize<br />

method execution policies, to enforce asynchronous execution for instance.<br />

Removing this intercession handler from the OMOP would remove<br />

its ability to facilitate different policies for method invocation, and<br />

as a consequence significantly reduce the number of supported concepts<br />

for which it can enforce guarantees.<br />

Thread Resumption Event-loop actors and CSP require that only a single<br />

thread executes the event loop or the program on shared mutable state.<br />

Based on the notion of ownership and domains, these concepts require<br />

control over the number of active threads. Since the thread itself is not<br />

necessarily owned by a domain when it attempts to execute in that domain,<br />

the resumption cannot be customized via custom method invocation<br />

policies. Thus, the OMOP needs the #requestThreadResume: intercession<br />

handler to capture this operation. Without it it would not be<br />

possible to guarantee that the number of threads executing in a domain<br />

be restricted.<br />

Primitives Concrete primitives are specific to a VM. However, the notion of<br />

primitives is available in all VMs. Primitives either make functionality<br />

of the un<strong>de</strong>rlying platform available or they implement functionality<br />

that cannot be expressed in the language that the VM implements.<br />

Since such primitives are free to access object state, execute methods, or<br />

change internal state of the VM, language implementers need to adapt<br />

them in case they conflict with the semantics of a concurrent programming<br />

concept. For instance, reflection is implemented via primitives and<br />

needs to be subjected to concurrency semantics (cf. Sec. 3.3.5). To this<br />

end, the OMOP provi<strong>de</strong>s the #prim* intercession handlers. It is required<br />

because the primitives would otherwise void the <strong>de</strong>sired semantics.<br />

This section shows that the OMOP abstracts makes abstractions of concrete<br />

concepts by providing mechanisms that enable their implementation. Furthermore,<br />

for each mechanism of the OMOP it argues that it is required to satisfy<br />

the purpose of a substrate for concurrent programming concepts. Thus, the<br />

OMOP is minimal, because removing any of its parts would significantly <strong>de</strong>crease<br />

its functionality and it would not be able to satisfy its requirements (cf.<br />

Sec. 3.4).<br />

175

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

Saved successfully!

Ooh no, something went wrong!