Changes between Version 8 and Version 9 of Commentary/Rts/Scheduler


Ignore:
Timestamp:
Sep 15, 2006 12:12:01 AM (9 years ago)
Author:
nr
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Rts/Scheduler

    v8 v9  
    177177== The Scheduler's main loop ==
    178178
     179{{{
     180scheduler(cap)
     181{
     182  for (;;) {
     183    yieldCapability(cap);  /* give cap to anybody wanting in from outside */
     184    tso = popRunQueue(cap);
     185    result = StgRun(tso);
     186    case result of
     187      out of heap -> re-enqueue tso; call GC;
     188      out of stack -> enlarge tso; re-enqueue tso;
     189      time expired -> put tso on end of queue; /* round robin */
     190      finished ->
     191        if (tso is a bound thread)
     192          return;
     193        else
     194          continue;
     195    }
     196}
     197}}}
     198
    179199== Affinity and migration ==
    180200