Mobile Data, Dynamic Allocation and Zero Aliasing: an occam Experiment

Traditional imperative languages (such as C) and modern object-oriented languages are plagued by uncontrolled resource aliasing problems. Add in concur- rency and the problems compound exponentially. Improperly synchronised access to shared (i.e. aliased) resources leads to problems of race-hazard, deadlock, livelock and starvation. This paper describes the binding into occam (a concurrent processing language based on CSP) of a secure, dynamic and efficient way of sharing data between parallel processes with minimal synchronisation overheads. The key new facilities provided are: a movement semantics for assignment and communication, strict zero-aliasing, apparently dynamic memory allocation and automatic zero-or-very-small-unit-time garbage collection. The implementation of this mechanism is also presented, along with some initial performance figures (e.g. 80ns for mobile communication on an 800 MHz Pentium 3). With occam becoming available on a variety of microprocessors for GUI building, internet services and small-memory-footprint embedded products, these capabilities are timely. Lessons are drawn for concurrency back in OO languages - and especially for the JCSP (CSP for Java) package library.

[1]  Per Brinch Hansen,et al.  Efficient parallel recursion , 1995, SIGP.

[2]  Frederick R. M. Barnes,et al.  Blocking System Calls in KRoC/Linux , 2000 .

[3]  F. Barnes tranx 86 – an Optimising ETC to IA 32 Translator , 2001 .

[4]  Frederick R. M. Barnes tranx86 - an Optimising ETC to IA32 Translator , 2001 .

[5]  Peter H. Welch,et al.  The Kent retargetable occam compiler , 1996 .

[6]  A. W. P. Bakkers Blocking System Calls in KR o C / Linux , .

[7]  Peter H. Welch Parallel and Distributed Computing in Education , 1998, VECPAR.

[8]  James Moores,et al.  User-defined data types and operators in occam , 1999 .

[9]  Peter H. Welch,et al.  Process Oriented Design for Java: Concurrency for All , 2002, International Conference on Computational Science.

[10]  C. A. R. Hoare,et al.  Communicating sequential processes , 1978, CACM.

[11]  Michael D. Poole Extended Transputer Code - a Target-Independent Representation of Parallel Programs , 1998 .

[12]  Doug Lea,et al.  Concurrent programming in Java - design principles and patterns , 1996, Java series.

[13]  Andrew William Roscoe,et al.  The Theory and Practice of Concurrency , 1997 .

[14]  Bill Roscoe,et al.  Denotational semantics for occam2‚ Part 2 , 1994 .

[15]  Robert E. Strom,et al.  The NIL distributed systems programming language: a status report , 1984, SIGP.

[16]  Doug Lea,et al.  Concurrent Programming In Java , 1996 .

[17]  Doug Lea Concurrent Programming in Java. Second Edition: Design Principles and Patterns , 1999 .

[18]  Peter H. Welch,et al.  Higher levels of process synchronisation , 1997 .

[19]  David C. Wood An Experiment with Recursion in occam , 2000 .

[20]  Peter H. Welch Java threads in the light of occam/CSP , 1997 .

[21]  Peter H. Welch,et al.  Mobile Data Types for Communicating Processes , 2001 .

[22]  Occam 2 - reference manual ; INMOS Limited , 1988, Prentice Hall International Series in Computer Science.

[23]  T Locke Towards a Viable Alternative to OO -- Extending the sf occam/CSP Programming Model , 2001 .