This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: time slicing problem


On Mon, 2003-11-03 at 09:34, Luca Formaggio wrote:
>  --- Gary Thomas <gary@mlbassoc.com> ha scritto: >
> Please copy your email to the list so that all may
> > benefit.
> > Private email support from MLB Associates is only
> > available
> > under contract.
> > 
> > On Mon, 2003-11-03 at 08:44, Luca Formaggio wrote:
> > >  --- Gary Thomas <gary@mlbassoc.com> ha scritto: >
> > On
> > > Mon, 2003-11-03 at 08:19, Luca Formaggio wrote:
> > > > > Hi. 
> > > > > I need that my application that run over ecos
> > run
> > > > > continuously whitout any interruptions of the
> > > > operatig
> > > > > system. It is possible? I try to recompile
> > ecos
> > > > > whitout the scheduler timeslicing option but I
> > > > receive
> > > > > a build error. 
> > > > 
> > > > What do you mean "without any interruptions?" 
> > If
> > > > you want
> > > > some code to "just run" - why do you need an OS
> > at
> > > > all?  What
> > > > facilities of the operating system are you
> > using?
> > > > 
> > > > -- 
> > > > Gary Thomas <gary@mlbassoc.com>
> > > > MLB Associates
> > > > 
> > > > 
> > > > -- 
> > > > Before posting, please read the FAQ:
> > > > http://sources.redhat.com/fom/ecos
> > > > and search the list archive:
> > > > http://sources.redhat.com/ml/ecos-discuss
> > > >  
> > > I have a function that consume a specified number
> > of
> > > clock cycles, this number is a parameter of this
> > > function. But in some cases the function consume a
> > > number of cycles greater than the number in the
> > > parameter. This problem happens at constant time
> > > interval. I think that is the o.s. that
> > ''preempt''
> > > the thread when the time slice is reached. My
> > > reasoning is correct?
> > 
> > More likely, this is happening when the system clock
> > "ticks".
> > If you have such a function which cannot tolerate
> > this, i.e.
> > it must run in a particular number of cycles, you
> > could turn
> > off the interrupts.  On the other hand, if you have
> > such a 
> > function, why do you need an operating system at
> > all?
> > 
> > -- 
> > Gary Thomas <gary@mlbassoc.com>
> > MLB Associates
> >  
> I try to explain me:
> I have a ISS(powerpc simulator), on this ISS run my
> application whit ecos o.s.. When the application is
> stopped on a breakpoint I use the GDB 'call' command
> for run a function of my program that consume a
> predetermined number of clock cycles. This call is for
> sincronization of the time of the ISS whith another
> exeternal program(SystemC). Every a approximately 5000
> clock cycles the function it makes to be left over the
> clocks counter of approximately 1000 cycles with loss
> of syncronization. I think that these 1000 cycles in
> excess are the results of the preempt of the o.s. that
> suspend the process for internal operations and then
> resume it. I need that the execution of the function
> that consume cycles is executed without interruptions.
> For the problem of compiling ecos. When i compile
> without the scheduler timeslicing option in the kernel
> scheduler section, I receive this error:
> 
> powerpc-eabi-gcc -c 
> -I/home/formaggi/ecos/work/powerpc_no_timeslice_install/include
> -I/home/formaggi/ecos/ecos-2.0/packages/compat/posix/v2_0
> -I/home/formaggi/ecos/ecos-2.0/packages/compat/posix/v2_0/src
> -I/home/formaggi/ecos/ecos-2.0/packages/compat/posix/v2_0/tests
> -I.
> -I/home/formaggi/ecos/ecos-2.0/packages/compat/posix/v2_0/src/
> -mcpu=603 -msoft-float -Wall -Wpointer-arith
> -Wstrict-prototypes -Winline -Wundef
> -Woverloaded-virtual -g -O2 -ffunction-sections
> -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc
> -finit-priority -Wp,-MD,src/mqueue.tmp -o
> src/compat_posix_mqueue.o
> /home/formaggi/ecos/ecos-2.0/packages/compat/posix/v2_0/src/mqueue.cxx
> In file included from
> /home/formaggi/ecos/ecos-2.0/packages/compat/posix/v2_0/src/pprivate.h:72,
> make[1]: Leaving directory
> `/home/formaggi/ecos/work/powerpc_no_timeslice_build/compat/posix/v2_0'
>                  from
> /home/formaggi/ecos/ecos-2.0/packages/compat/posix/v2_0/src/mqueue.cxx:89:
> make: Leaving directory
> `/home/formaggi/ecos/work/powerpc_no_timeslice_build'
> /home/formaggi/ecos/work/powerpc_no_timeslice_install/include/cyg/posix/export.h:100:
> parse
> 
>    error before `*' token
> /home/formaggi/ecos/work/powerpc_no_timeslice_install/include/cyg/posix/export.h:102:
> parse
>    error before `*' token
> make[1]: *** [src/mqueue.o.d] Error 1
> make: *** [build] Error 2

Try building the kernel using the 'minimal' template.

I still find it odd that you want to run some function and count cycles,
but you've build a kernel which includes most everything, including 
POSIX support.  This seems to be contradictory to me.  If all you want
to do is run some PowerPC function and count cycles, you don't need
the OS at all.  However, if you need OS functionality, then counting
cycles doesn't make sense.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]