HELP! * BLUE=global GREY=local Global HTML version of Foils prepared July 6,1995

Foil 29 TCE -- Implementation -- 8: Preemptive Scheduling

From Threads with TCE in detail CPS600 Spring Semester95 -- April 1995. by Janusz Niemiec and Geoffrey Fox * See also color IMAGE

Once started, the preemptive scheduling can be deactivated by calling tce_preempt_off. During a program execution preemptiveness can be switched on and off freely.
  • To implement the preemptive execution TCE uses two signals -- the clock signal and the IO signal (SIGALRM and SIGIO on Unix-like Operating Systems). When one of those signals is generated, the current execution context is preempted, and the control is transferred to appropriate signal handler. The handler, then, either calculates the time used by the currently running thread (clock) or inspects IO descriptors. When any of these activities transferred a higher priority thread into the ready state, the context switch takes place.
  • Since the preemptive scheduling can change threads' contexts any time, the application should guard its critical sections by TCE semaphores. This way, a desired order of execution can be assured.


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Feb 18 1997