Communicating Sequential Processes + D = DCSP
John Reimer
terminal.node at gmail.com
Sun Jan 28 21:23:52 PST 2007
On Sun, 28 Jan 2007 23:50:24 -0500, Mikola Lysenko wrote:
> 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
Nice work, Mik! Thanks for contributing this. I think there may be some
valuable applications for D and CSP. It might be fun to try using it with
games/graphic software -- perhaps using the cooperative scheduler
initially.
It's certainly an opportunity to showcase concurreny theory implementations
in D.
Thanks much!
-JJR
More information about the Digitalmars-d-announce
mailing list