All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: nocia.one@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] How to get the next periodic task awakening
Date: Wed, 01 Jul 2009 13:43:21 +0200	[thread overview]
Message-ID: <4A4B4BD9.2020506@domain.hid> (raw)
In-Reply-To: <4A4B34D3.3090004@domain.hid>

Nocia wrote:
> Hi all,
> 
> I'm a beginer in the Xenomai world.
> 
> 
> I'm working on the Xenomai kernel in order to minimize the power
> consumption, for my university final project
> (/http/://xenomaiote.googlecode.com).
> 
> To do that I'm trying to implement OTE (one time extension).

Ok, I have found this
http://www.google.com/url?sa=t&source=web&ct=res&cd=8&url=http%3A%2F%2Fwww.embeddedcomputingconference.ch%2Fdownload_sec%2F1B-Evequoz.pdf&ei=-UhLSsLDGJaRjAfwm4Fl&rct=j&q=%22one+time+extension%22+operating+system&usg=AFQjCNGPkM9-VpD8jFNIa38xmu4hruEdkw

Is this what you are talking about?


> (...)
> To get the next timer that will wake up :
> 
> xntimerq_head(&sched->timerqueue)
> 
> 
> To get the date of the next wake up :
> 
> xntimerh_date(&timer->aplink)
> 
> 
> Then I compare this date with the date of the next ingoing task (except
> the root task) with xnarch_get_cpu_tsc()

xntimerq_head is the next timer which is going to fire, this is not
necessarily attached to a task, and even if it was, there is no
guarantee that nothing else will happen between now and this next event.
Another task may be woken up by an interrupt, or even by the current
task, tasks are not necessarily time-triggered.

xntimerh_date(&timer->aplink) only works for aperiodic timers.

I think you are looking in the wrong direction. What you really need is
to implement a new scheduler class (EDF with OTE or something like
that), and implement things in this abstraction, not by patching
xnpod_schedule.

Also note that the default scheduler classes (FIFO and RR) do their job
without knowing what the WCET of a task is, and from what I saw,
skimming the document mentioned above, you need this information, so,
you absolutely need a new scheduler class.


-- 
					    Gilles.


      reply	other threads:[~2009-07-01 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 10:05 [Xenomai-core] How to get the next periodic task awakening Nocia
2009-07-01 11:43 ` Gilles Chanteperdrix [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A4B4BD9.2020506@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=nocia.one@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.