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

Foil 28 TCE -- Implementation -- 7: Time Slice per Thread in Scheduling

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

A higher priority thread becomes ready
  • the current thread exhausted its time slice and there is one or more threads with the same priority as the current one
  • The time slice for a particular priority queue can be controlled by the application:
void main(int argc, char *argv[])
{
  • TCE_Thrd *thrd;
  • int prm = 0;
  • int priority = 31;
  • int slice = 10; /* 10 ms slice */
  • ...
  • tce_preempt_on();
  • thrd = tce_thrd_init(func,prm);
  • tce_thrd_priority(thrd,priority);
  • tce_clock_slice(priority,slice);
  • tce_thrd_start(thrd);
  • ...
  • tce_preempt_off();
  • ...
}


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