59 research outputs found

    Loft+Cyclone

    Get PDF
    This paper reports on an experiment to add concurrency to the Cyclone programming language, in order to get a safe concurrent language. The basic model considered is that of FairThreads in which synchronous and asynchronous aspects are mixed. The language Loft implements the FairThreads model in C. In this paper, one uses Cyclone instead of C in the implementation of Loft. Using the multi-threaded version of Boehm's GC, one gets an extension of Cyclone to concurrency which is as safe as Cyclone for sequential code, with some additional safety verifications for concurrent code

    A Benchmark for Multicore Machines

    Get PDF
    Simulation of collision of particles is proposed as a benchmark program for multicore machines. The focus is put on synchronisation and communication of threads. Some results obtained on a dual-core machine are presented

    FairThreads: mixing cooperative and preemptive threads in C

    Get PDF
    FairThreads offers a very simple framework for concurrent and parallel programming. Basically, it defines schedulers which are synchronization servers, to which fair threads are linked. All threads linked to the same scheduler are executed in a cooperative way, at the same pace, and they can synchronize and communicate using broadcast events. Threads which are not linked to any scheduler are executed by the OS in a preemptive way, at their own pace. FairThreads defines automata to deal with small, short-lived tasks, which do not need the full power of native threads. Automata have lightweight implementation and are not subject to some limitations of native threads. The implementation in C is based on the pthreads library. Several fair schedulers, executed by distinct pthreads, can be used simultaneously in the same program. Using several schedulers and unlinked threads, programmers can take benefit of multiprocessors machines (basically, SMP architectures

    Java Fair Threads

    Get PDF
    Fair threads are cooperative threads run by a fair scheduler which gives them equal access to the processor. Fair threads can communicate using broadcast events, and are fully portable as their semantics does not depends on the executing platform. Fine control over fair threads execution is possible allowing the programming of specific user-defined scheduling strategies. This paper presents fair threads in the context of the Java language, and describes the API to use them. Link with reactive programming, which is at the basis of the fair threads proposal, is also considered

    Reactive Programming of Cellular Automata

    Get PDF
    Implementation of cellular automata using reactive programming gives a way to code cell behaviors in an abstract and modular way. Multiprocessing also becomes possible. The paper describes the implementation of cellular automata with the reactive programming language LOFT, a thread-based extension of C. Self replicating loops considered in artificial life are coded to show the interest of the approach

    Reactive Programming of Simulations in Physics

    Full text link
    We consider the Reactive Programming (RP) approach to simulate physical systems. The choice of RP is motivated by the fact that RP genuinely offers logical parallelism, instantaneously broadcast events, and dynamic creation/destruction of parallel components and events. To illustrate our approach, we consider the implementation of a system of Molecular Dynamics, in the context of Java with the Java3D library for 3D visualisation

    Cooperative Threads and Preemptive Computations

    Get PDF
    A two-level model for reactive systems programming is introduced in which threads linked to the same scheduler are run cooperatively and have the possibility to escape from the scheduler control to run preemptively. We present a type and effect system to enforce a logical separation of the memory which ensures that, when running in preemptive mode, threads do not interfere with those running in cooperative mode. Thus, the atomicity property at the basis of the cooperative model is preserved

    Safe Reactive Programming: The FunLoft Proposal

    Get PDF
    We propose a multicore-ready programming language based on a two-level shared memory model. Concurrency units are schedulers and threads which are dispatched on available cores in a preemptive way. Each scheduler is in charge of its own portion of the memory. At runtime, several threads may link to a common scheduler. In this case, they enter a cooperative mode, evolve in synchronous rounds, and are granted access to the scheduler memory. At the opposite, an autonomous thread runs at its own pace but has access only to a local memory. The language ensures that programs are free of memory leaks, that code between two cooperation points is atomic, and that rounds are fair and always terminate (no run-time error nor divergence)

    Formalisation of FunLoft

    Get PDF
    We formalise a thread-based concurrent language which makes resource control possible. Concurrency is based on a two-level model: threads are executed cooperatively when linked to a scheduler, and unlinked threads and schedulers are executed preemptively, under the control of the OS. We present a type and effect system to enforce a logical separation of the memory which ensures that (1) when running in preemptive mode, threads do not interfere with other threads; (2) threads linked to a scheduler do not interfere with threads linked to another scheduler. Thus, we get a concurrency model in which well-typed programs are free from data-races. The type system also insures that well-typed programs are bounded in memory and in their use of the CPU. Detection of termination of recursive functions and stratification of references in memory are techniques used to get these properties

    Determination of Forces from a Potential in Molecular Dynamics

    No full text
    11 pagesIn Molecular Dynamics (MD), the forces applied to atoms derive from potentials which describe the energy of bonds, valence angles, torsion angles, and Lennard-Jones interactions of which molecules are made. These de finitions are classic; on the contrary, their implementation in a MD system which respects local equilibrium of mechanical conditions is usually not described. The precise derivation of the forces from the potential and the proof that their application preserves energy is the object of this note. This work is part of the building of a multi-scale MD system, presently under development
    • …
    corecore