Another RT issue Mark K. Gardner (14 Apr 2000 16:40 UTC)
Re: Another RT issue Marc Feeley (15 Apr 2000 02:45 UTC)
Re: Another RT issue Mark K. Gardner (17 Apr 2000 15:24 UTC)

Another RT issue Mark K. Gardner 14 Apr 2000 16:40 UTC

Oops! There is another issue that would make the future RT-SRFI
incompatible with SRFI-18.

The following is from the Priority and Fairness section.

>    When two threads A and B are blocked on a given mutex or condition
>    variable, and A blocked before B, then
>     1. if A's priority is not less than B's priority, A will wakeup before
>        B
>     2. otherwise, A will wakeup before or after B.

For RT support, the highest priority task should wake up first. If the
priorities are the same, then it really doesn't matter so I would
suggest that the thread blocked first wakes first.

Thus to not preclude the future RT-SRFI, the section should read:

  1. The highest priority thread will wake first.
  2. If multiple threads have the same priority, the first to block
     will be the first to wake.

Although this does not produce the same schedule of tasks as the above
definition, I can't envision an application where this behavior is not
preferable. Perhaps Marc or someone else can give an example of an
application where blocking order should take precedence over priority
when it comes to waking a task.


Mark K. Gardner
Network Engineering, CIC-5
Los Alamos National Laboratory
P.O. Box 1663, M.S. D451
Los Alamos, NM 87545
Phone: 1-505-665-4953