preemption question

Bob Wisdom bobwis at asczone.com
Thu Mar 14 08:54:10 UTC 2002


I didn't see an answer to Stan's query; must have been asleep again....
My understanding is that task 1 will run, and task 2 and 3 would not be
running although eligible to start.
Is this right?
We had a learning curve to go through trying to understand the hard
real-time scheduling of RTEMS coming from OS/9, and am sure it could still
hold surprises for us. Any comments?
Bob Wisdom
bobwis at asczone.com

----- Original Message -----
From: "Stan" <zylog at club-internet.fr>
To: <rtems-users at oarcorp.com>
Sent: Monday, March 11, 2002 12:07 PM
Subject: preemption question


> Hi,
>
> if :
>
> ***********************************
> long c1, c2, c3;
>
> rtems_task t1(
>   rtems_task_argument argument
> )
> {
>     c1=0;
>     while(1){
>         c1++;
>     }
> }
>
> rtems_task t2(
>   rtems_task_argument argument
> )
> {
>     c2=0;
>     while(1){
>         c2++;
>     }
> }
> rtems_task t3(
>   rtems_task_argument argument
> )
> {
>
>     c3=0;
>     while(1){
>         c3++;
>     }
> }
>
> ***********************************
> and  tasks mode = RTEMS_PREEMPT + RTEMS_NO_TIMESLICE, with egal priority.
>
> Which has to be the result after n second?
>
> c1 >0
> c2 =0
> c3 =0
>
> or
>
> c1 >0
> c2 >0
> c3 >0
>
> Thanks a lot.
>
>
>
> Note: creation in order t1,t2 and t3.
>
>         Stan .
>
>
>




More information about the users mailing list