Scheduling without Timeslice...

Camilo Alejandro Arboleda CamiloAlejo at
Mon Dec 1 13:22:42 UTC 2003

There is a thread in the mailing list talking about the issue 

The problem is that the timeslice is reset every time a task is 
preempted. That way your first idle task never gets out of CPU time. The 
solution is using a timeslice exhaustion scheme (like Posix one).

Joel Sherrill filled a BR (#514) and created a working patch. It has a 
small typo in taskcreate.c, but you'll see it  easily.

cedric_aubert at wrote:

>Hi all,
>I have found some trouble with the scheduler without
>First thing (it's just a question not a trouble), in
>the file
>"/c/src/lib/libbsp/shared/bsplibc.c", I have found
>that we initialize
>the libc in reentrant only if we have
>ticks_per_timeslice > 0.
>But with preemption, we could have some need of
>reentrant without
>timeslicing. Am I wrong ?
>    void bsp_libc_init(...)
>    {
>        ...
>        if ( BSP_Configuration.ticks_per_timeslice > 0 )
>          libc_init(1);                /* reentrant if
>possible */
>        else
>          libc_init(0);                /* non-reentrant
>    }
>Second thing, in the thread idle. This thread is at
>prio 255 (lower). I have
>build another thread (user task) with prio 255 too.
>But this task never been
>executed, it was always in READY State but don't
>start, in fact, I think,
>the idle thread was
>executing first and never give cpu usage to the user
>task ( because no
>timeslice ).
>Am I right ? Should have some task with the same prio
>that the idle one ?
>I try to grow a little the user task and that's works.
>Thanks a lot
>Do you Yahoo!?
>Free Pop-Up Blocker - Get it now

Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop at Netscape!

More information about the users mailing list