2 research outputs found

    Combinators for Message-Passing in Haskell

    Get PDF
    Much code in message-passing programs is tedious, verbose wiring code. This code is error prone and laborious - and tends to be repeated across many programs with only slight variations. By using type-classes, higher-order and monadic functions in Haskell, most of this code can be captured in re-usable high-level combinators that shorten and simplify message-passing programs. We motivate the design and use of these combinators via an example of a concurrent biological simulation, and explain their implementation in the Communicating Haskell Processes library

    Multicore Scheduling for Lightweight Communicating Processes

    Get PDF
    Process-oriented programming is a design methodology in which software applications are constructed from communicating concurrent processes. A process-oriented design is typically composed of a large number of small isolated concurrent components. These components allow for the scalable parallel execution of the resulting application on both shared-memory and distributed-memory architectures. In this paper we present a runtime designed to support process-oriented programming by providing lightweight processes and communication primitives. Our run-time scheduler, implemented using lock-free algorithms, automatically executes concurrent components in parallel on multicore systems. Run-time heuristics dynamically group processes into cache-affine work units based on communication patterns. Work units are then distributed via wait-free work-stealing. Initial performance analysis shows that, using the algorithms presented in this paper, process-oriented software can execute with an efficiency approaching that of optimised sequential and coarse-grain threaded designs
    corecore