Re: bug in Real-Time Preemption

Esben Nielsen
2005-06-10T07:47:04Z

On Fri, 10 Jun 2005, Milan Svoboda wrote:

> > I tried to your program: I couldn't make it fail under PREEMPT_RT. No
> > matter what the termination value for the while loop in the priority 10
> > thread I put in the priority 50 thread printed the same "Dif:".
> > I also put in a global variable, thread_done, which I set in the priority
> > 10 thread after the loop and printed it out along with "Dif:". It was not
> > set. I also tried to add exit(1) at the end of the priority 10 thread...
> >
> > I see no odd behaviour.
> >
> > Esben
> >
>
> Look at my results:
>
> I added a flag too.
>
> under non RT preempt:
> (these results are expected)
>
> ./a.out
> Flag: 0, Dif:11714
> ./a.out
> Flag: 0, Dif:11678
>
(Flag:0 means the counting thread haven't finished, right?)

This is what I see on PREEMPT_RT 2.6.12-rc6-V0.7.48-04.

> under full RT preempt:
> ./a.out
> Flag: 1, Dif:582536
> ./a.out
> Flag: 1, Dif:579791
>
> This shows that thread with bigger priority was
> blocked by the thread with lower priority!
>

Yes. Odd. Tried on V0.7.48-04 ?

Esben