Communicating Sequential Processes + D = DCSP

Mikola Lysenko mclysenk at mtu.edu
Sun Jan 28 20:50:24 PST 2007


DCSP is a lightweight concurrency library that I wrote last summer. 
While most threading libraries seek to avoid concurrency or eliminate it 
entirely, DCSP takes a slightly different approach.  The idea grew from 
the work I did on StackThreads and is inspired by C.A.R. Hoare's 
Communicating Sequential Processes and Robin Milner's Pi-Calculus.  In 
DCSP, concurrency is the essential feature of program design.  This is 
not as absurd as it initially sounds, since many programs are innately 
concurrent.

A DCSP program is composed of a network of communicating processes, each 
connected by synchronous point-to-point channels.  This idea is easy to 
visualize like a large digital circuit.

The syntax is closer to Occam, and is far simpler than JCSP. 
Additionally, the performance of DCSP far surpasses JCSP, and unlike 
C++CSP, DCSP is actually multi-threaded.

The current version supports two schedulers, one cooperative scheduler 
based on stack threads, and another threaded scheduler using Phobos' 
threads.  In the future, these may be supplemented with a hybrid 
scheduler using a work-stealing algorithm similar to MIT's CiLK project. 
  Additionally, the basic ideas in this project could be extended to 
network communication.

Anyway, you can check out the library at: http://www.assertfalse.com

JCSP: http://www.cs.kent.ac.uk/projects/ofa/jcsp/
C++CSP: http://www.twistedsquare.com/cppcsp/
Occam: http://www.wotug.org/occam/
Communicating Sequential Processes: http://www.usingcsp.com/cspbook.pdf

-Mik



More information about the Digitalmars-d-announce mailing list