FairThreads: mixing cooperative and preemptive threads in C

被引:23
作者
Boussinot, F [1 ]
机构
[1] INRIA, CMA, EMP, MIMOSA Project, F-06902 Sophia Antipolis, France
关键词
concurrency; parallelism; thread; C language; multiprocessor; reactive programming;
D O I
10.1002/cpe.919
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
FairThreads introduces fair threads which are executed in a cooperative way when linked to a scheduler, and in a preemptive way otherwise. Constructs exist for programming the dynamic linking/unlinking of threads during execution. Users can profit from the cooperative scheduling when threads are linked. For example, data only accessed by the threads linked to the same scheduler does not need to be protected by locks. Users can also profit from the preemptive scheduling provided by the operating system (OS) when threads are unlinked, for example to deal with blocking I/Os. In the cooperative context, for the threads linked to the same scheduler, FairThreads make it possible to use broadcast events. Broadcasting is a powerful, abstract, and modular means of communication. Basically, event broadcasting is made possible by the specific way threads are scheduled by the scheduler to which they are linked (the 'fair' strategy). FairThreads give a way to deal with some limitations of the OS. Automata are special threads, coded as state machines, which do not need the allocation of a native thread and which have efficient execution. Automata also give a means to deal with the limited number of native threads available when large numbers of concurrent tasks are needed, for example in simulations. Copyright (c) 2005 John Wiley & Sons, Ltd.
引用
收藏
页码:445 / 469
页数:25
相关论文
共 17 条
  • [1] [Anonymous], 2000, TAMING JAVA THREADS
  • [2] THE ESTEREL SYNCHRONOUS PROGRAMMING LANGUAGE - DESIGN, SEMANTICS, IMPLEMENTATION
    BERRY, G
    GONTHIER, G
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 1992, 19 (02) : 87 - 152
  • [3] REACTIVE C - AN EXTENSION OF C TO PROGRAM REACTIVE SYSTEMS
    BOUSSINOT, F
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 1991, 21 (04) : 401 - 428
  • [4] Boussinot Frederic, 2001, RR4139 INRIA
  • [5] MONITOR CLASSIFICATION
    BUHR, PA
    FORTIER, M
    COFFIN, MH
    [J]. ACM COMPUTING SURVEYS, 1995, 27 (01) : 63 - 107
  • [6] CHRISTOPHER TW, 2001, SUN MICROSYSTEMS PRE
  • [7] CHORES - ENHANCED RUN-TIME SUPPORT FOR SHARED-MEMORY PARALLEL COMPUTING
    EAGER, DL
    ZAHORJAN, J
    [J]. ACM TRANSACTIONS ON COMPUTER SYSTEMS, 1993, 11 (01): : 1 - 32
  • [8] ENGELSCHALL RS, 2000, P USNEIX ANN TECHN C
  • [9] Halbwachs N., 1993, Synchronous Programming of Reactive Systems
  • [10] KEPPEL D, 1993, 930506 UWCSE U WASH