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]

R: R: Thread execution time


There is a couple of things that I still don't understand:
When tm_basic mesures "Thread switch" it is just the time needed to make a
context switch (i.e. save the context of old thread, load the new one's and
let it start), is it?
Where CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS is set? I cannot find it
I also find really strange for "ticks" to be a fixed time, regardless of the
actual work frequency. In my configration I get a "Thread Switch" of
approximately 50ms. So it seems that OS executes for at least as much time
as threads. Is it correct?

Michele

----- Original Message -----
From: Andrew Lunn <andrew.lunn@ascom.ch>
To: Michele Portolan <michele.Portolan@imag.fr>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Thursday, August 28, 2003 12:12 PM
Subject: Re: [ECOS] R: [ECOS] Thread execution time


> On Thu, Aug 28, 2003 at 11:24:22AM +0200, Michele Portolan wrote:
> > What do you mean by "ticks"? Do yo mean clock cycles?
>
> A tick is normally 10ms, but as with everything else in eCos, its
> configurable.
>
> > I am working on possible modifications of context-switching mechanism to
> > implement fault tolerance funtionalities.
> > I have just begun, there is not much yet, but I need these data as a
> > comparison and make some "a priori" evaluation
>
> Well 50ms round robin times and micro second context switches? There
> are orders of magnitude differences here!
>
> What sort of fault tolerance functionalities? IMHO, they don't make
> much sense in an embedded system. You don't have a process context you
> can clean up when something goes wrong. The thread could have all
> sorts of mutex's locked, semaphores signaled, memory allocated
> etc. Killing a thread will probably result in a deadlock sometime
> later or memory exhortion. You just have a cascade of faults....
>
> About the only fault tolerance functionality that makes sense to me is
> "Something major has happened, lets try to do a controlled shutdown
> and reboot before the watchdog timer reboot us anyway." The eCos
> exception handling gives you enough to do this already.
>
>          Andrew
> >
> > Michele
> >
> > > On Thu, Aug 28, 2003 at 10:54:19AM +0200, Michele Portolan wrote:
> > > > Hi,
> > > > how can I know the time quantum left by eCos to a thread, i.e. the
time
> > > > between two context switches?
> > >
> > > Im not sure i understand what you mean. Do you mean how long does a
> > > thread run before it is round robin time sliced by another thread at
> > > the same priority? By default a thread runs for five ticks. Its
> > > controlled by CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS.
> > >
> > > > Is there also a way to estimate the time needed by "load context"
only
> > and
> > > > not complete context switch?
> > >
> > > What exactly are you trying to work out? What is the reason behind
these
> > > questions.
> > >
> > >         Andrew
> >
> >
> > --
> > Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> > and search the list archive: http://sources.redhat.com/ml/ecos-discuss
> >
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>


-- 
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]