rtems_event_receive and timeslicing

Brett Swimley brett.swimley at aedinc.net
Tue Oct 23 16:33:03 UTC 2001


I'll try knocking the ticks_per_timeslice down, and try it again.

I do have a clock driver. I've verified it is running and calling
rtems_clock_tick.

However, fundamentally, my perceptions aren't wrong?  The blocked task
should run in this situation when it gets the timeslice?

Thanks,

Brett

> -----Original Message-----
> From: Joel Sherrill [mailto:joel.sherrill at OARcorp.com]
> Sent: Tuesday, October 23, 2001 9:58 AM
> To: brett.swimley at aedinc.net
> Cc: 'RTEMS'
> Subject: Re: rtems_event_receive and timeslicing
>
>
>
>
> Brett Swimley wrote:
> >
> > I have a situation where I have two tasks running at the
> same priority (=
> > 128). Both tasks were created with RTEMS_PREEMPT and
> > RTEMS_TIMESLICE.
> >
> > One task is blocked, waiting on an event that is sent by an
> ISR.  The other
> > task is in an infinite loop as follows:
> >
> > for ( ;; )
> > {
> >         ;
> > }
> >
> > The task that is blocked on the rtems_event_receive() never
> appears to
> > receive the event.  However, if I place an
> >
> >  rtems_task_suspend( RTEMS_SELF );
> >
> > call prior to the infinite loop in the 2nd task - the first
> task does
> > receive the event.
> >
> > I won't have this task construct in the near future as I
> implement more
> > functionality, but I would like to understand if the
> blocked task should run
> > under this situation with timeslicing enabled.  If I am missing some
> > configuration options as well, I would like to know.
> >
> > I have
> > #define CONFIGURE_TICKS_PER_TIMESLICE   50
> > in my Initialization function file.
> >
> > I'm currently using the rtems-ss-20010816 snapshot.
>
> My guess is that you don't have a clock driver.  Or that you do
> and the time quantum is larger than you think based upon
> CONFIGURE_MICROSECONDS_PER_TICK and
> (CONFIGURE_TICKS_PER_TIMESLICE == 50).
>
> A 10 millisecond tick (the default I think) and 50 ticks per
> timeslice is 1/2 second per timeslice.
>
>
>
> > Thanks for any insight.
> >
> > Regards,
> >
> > Brett Swimley
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel at OARcorp.com                 On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985
>




More information about the users mailing list