The main use of mobile channel bundles is to support the run-time reconfiguration of process networks
P and Q are now directly connected
Process networks may be arbitrarily reconfigured using mobile channels, but still only reconfiguring static networks
• Dynamic process creation makes this much more interesting
Communication and assignment in traditional occam systems incur an O(n) run-time cost for datacopying. In small localised systems (i.e. those which share a common memory), this run-time cost is often undesirable and often unnecessary. A common solution to this, in occam, is to implement a memory pool which uses RETYPEs and various compiler-builtins to generate pointers from variables. These pointers (usually represented by the INT type) can then be communicated and assigned in O(1) time. The disadvantage of this method is that the compiler can no longer perform parallel-usage and alias checks on the pointers— it just treats them as plain INTs. Thus the potential for introducing parallel race-hazards is high. However, in traditional occam, this is often the only solution. Mobiles, with their movement semantics, provide a simple and effective solution to this — with an implementation that uses communication and assignment of references and has aliasing strictly controlled. These semantics are enforced by the compiler both at compile-time (in the undefineness checker, section 4.6), and also at run-time, by invalidating ‘lost’ references.
Mobiles are not a new concept — movement semantics exist in other languages, for exampleNIL [SY85], although these tend to be few in number. The programming language Icarus [MM98b, MM98a, MM01] also supports a movement semantics, for both data and channels. Icarus
also introduces the concept of a borrowing semantics, that provides an explicit mechanism for temporarily moving data/ channe ls to another process and back at defined points. A similar mechanism also exists for mobile types in occam, although it is somewhat implicit — in procedure calls and abbreviations. For channels, communication and assignment using a movement semantics is the only option— copy semantics have no meaning when applied to channels, and are therefore banned in the standard occam language. Mobile channel-types provide this functionality, and also extend it — by allowing explicitly shared channel-types (for the construction of one-to-any, any-to-one and any-to-process
c-pgms.blogspot.com Moved
15 years ago
No comments:
Post a Comment