CSP for Java
|PREV NEXT||FRAMES NO FRAMES|
|jcsp.awt||This provides CSP extensions for all java.awt components -- GUI events and widget configuration map to channel communications.|
|jcsp.lang||This provides classes and interfaces corresponding to the fundamental primitives of CSP.|
|jcsp.plugNplay||This provides an assortment of plug-and-play CSP components to wire together (with Object-carrying wires) and reuse.|
|jcsp.plugNplay.ints||This provides an assortment of plug-and-play CSP components to wire together (with int-carrying wires) and reuse.|
|jcsp.util||This provides classes and interfaces to customise the semantics of Object channels.|
|jcsp.util.ints||This provides classes and interfaces to customise the semantics of int channels.|
This document is the specification for the JCSP core API.
JCSP provides a complete library for building complex functionality
through layered networks of communicating processes. It conforms to
model of cummunicating systems so that twenty years of theory, tools
and practical experience can be brought to bear in the support of Java
Newcomers to JCSP should start with the documentation on
which outlines and motivates the notion of components as communicating processes
and the process oriented design pattern.
Processes interact solely via CSP synchronising primitives, such as
or other well-defined modes of access
to shared passive objects. Processes do not invoke each other's methods.
Processes may be combined to run in
parallel. Processes may be combined to wait passively
on a number of
alternative events, with one of them
trigered into action only by the external generation of that event.
Such collections of events may
be serviced either
(guaranteeing no starvation of one event by the repeated arrival of its siblings),
by any user-defined
JCSP is an alternative to the built-in monitor model for Java threads. JCSP primitives should not normally be mixed into designs with synchronized method declarations, instances of the java.lang.Runnable interface or java.lang.Thread class, or invocations of the wait/notify/notifyAll methods from java.lang.Object.
However, JCSP is compatible with the built-in model and, with care, can be mixed
safely and profitably. In particular, process communication via wait-free
synchronized method invocations on a shared passive object directly
implements a common CSP server idiom
DisplayList for an example).
Further, existing libraries that interact with user software via listener
registration and callback (such as the standard AWT and Swing) can be
easily tailored to operate as processes with channel-based interfaces (for
example, see jcsp.awt).
Finally, we note that the JCSP library reflects
realisation of CSP,
with some extensions to take advantage of the dynamic nature of Java.
An occam PROC declaration maps simply into a class implementing
CSProcess, whose constructor parameters mirror the PROC
parameters and whose run method mirrors the PROC body.
This is the original exposition of CSP. Presentation is largely from the programmer's point of view. The Ada tasking model and the occam/transputer process model were derived from this work.`Communicating Sequential Processes', C.A.R. Hoare, Prentice Hall, 1985.
This is `the book'. Presentation is more abstract (i.e. mathematical) and a more general theory is given than in the original CACM paper. One crucial difference is that events (and channels) become concepts that are separate from the processes that engage in them. This difference was adopted in the occam/transputer model, but Ada missed out on it. The JCSP library follows the model presented in this book.`The Theory and Practice of Concurrency', A.W. Roscoe, Prentice Hall, ISBN 0-13-674409-5, 1997.
This brings CSP up to date with refinements developed over the past decade. It is `the new book'.`Communicating Sequential Processes and Deadlock' J.M.R.Martin, Chapter 1 from his Ph.D thesis ("The Design and Construction of Deadlock-Free Concurrent Systems"), University of Buckingham, UK, 1996.
This gives a crisp, amusing and accurate tour around all the CSP concepts, strongly recommended for beginners and experienced CSP users alike. [Actually only up to (and including) page 11 are for normal mortals - after that it starts to get scary. But those first few pages are a gem.]`A Classical Mind - Essays in Honour of C.A.R. Hoare', Edited by A.W. Roscoe, Prentice Hall, ISBN 0-13-294844-3, 1994.
Serious bedtime reading.`Parallel Processing with Communicating Process Architecture', I.R.East, UCL press, ISBN 1-85728-239-6, 1995.
This is an excellent text on how to design and program with the CSP model - many higher level design issues are addressed.`occam 2 -- including occam 2.1', John Galletly, UCL press, ISBN 1-85728-362-7, 1996.
This is a good textbook on the occam version of the CSP model. A knowledge of occam gives insight that makes multithreading in Java simpler and, hence, safer to manage ;-) ...`Parallel and Distributed Computing in Education', P.H.Welch, in Proceedings of VecPar'98, Lecture Notes in Computer Science #1573, Springer-Verlag, April 1999.
This is a tutorial introduction to CSP from the point of view of the programmer/designer. JCSP bindings to key examples are given in an appendix. See Abstract.`Java Threads in the Light of occam/CSP', P.H.Welch, in Architectures, Languages and Patterns for Parallel and Distributed Applications, Proceedings of WoTUG-21, pp. 259-284, IOS Press (Amsterdam), ISBN 90 5199 391 9, April 1998.
This is a tutorial introduction to the Java monitor model. It raises concern over its ease of use and the safety of its standard design patterns, but shows how it may be used to build the CSP primitives. Finally, it revisits those concerns and shows how they fade in the light of CSP. See Abstract.
CSP for Java
|PREV NEXT||FRAMES NO FRAMES|