HELP! * GREY=local LOCAL HTML version of Foils prepared July 6,1995

Foil 30 TCE -- Implementation -- 9:
To Preempt Or Not To Preempt, ...

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

Non-preemptive execution is in most cases a more efficient way to carry out computation:
  • Context switching between threads is a relatively expensive operation. In a non-preemptive environment it occurs only when a thread cannot proceed (has to be blocked) or yields control (under program control). Thus, the management of switching contexts is optimal (assuming that application can control it optimally).
  • Unnecessary or too frequent switches not only waste CPU time but also disrupt caches and can produce page faults.
  • Handling asynchronous signals (mandatory for the preemptive mode) spoils cache localities and on some processors can generate a lot of extra operations.



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