JCSP

From Wikipedia, the free encyclopedia

In computer science and software engineering, JCSP is an implementation of Communicating Sequential Processes (CSP) for the Java programming language.[1]

Although CSP is a mathematical system, JCSP does not require in-depth mathematical skill, allowing instead that programmers can achieve well-behaved software just by following simple rules.

There are four ways in which multi-threaded programs can fail untestably[citation needed]http://www-128.ibm.com/developerworks/java/library/j-csp1.html:

  • race conditions - shared variables may have indeterminate state because several threads access them concurrently without sufficient locking;
  • deadlock - two or more threads reach a stalemate when they try to acquire locks or other resources in a conflicting way;
  • livelock - similar to deadlock but resulting in endless wastage of CPU time;
  • starvation - one or more threads fail ever to get any work done, compromising the intended outcome of the software algorithms.

Generally, it is not possible to prove the absence of these four hazards merely by rigorous testing. Instead it is necessary to have a design that can demonstrate these four hazards don't exist. CSP allows this to be done using mathematics and JCSP allows it to be done pragmatically in Java programs.

Note that the CSP term process is used essentially as a synonym for thread in Java parlance; a process in CSP is a lightweight unit of execution that interacts with the outside world via events and is an active component that encapsulates the data structures on which it operates.

[edit] Other versions JCSP

JCSP re : Communicating Sequential Processes for Java Robot Edition.

JCSP re is a highly reduced version of the JCSP packages that were developed at the Napier University Edinburgh. Research into JCSP for robotics environments and JCSP for mobile environments is an active area of research at Napier University Edinburgh. Current research by Professor Jon Kerridge, Alex Panayotopoulos and Patrick Lismore at Napier University Edinburgh has resulted in a working implementation of 'JCSP re' a reduced version of JCSP that allows the development of the same concurrent software for robots, in particular the robots targeted for this research were the Lego Mindstorms NXT's because they can run the popular LeJOS NXJ virtual machine that executes Java source code.

  1. REDIRECT JCSP re

[edit] References

  1. ^ Abhijit Belapurkar (21 June 2005). CSP for Java programmers. IBM developerWorks. Retrieved on 2007-04-20.

[edit] External links