[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [=?iso-8859-1?Q?S=E9bastien?= GAUME<sgaume@b2i-toulous (fwd)



>From owner-rtl Thu May 10 01:06:36 2001
Received: from mail.b2i-toulouse.com (host.97.67.23.62.rev.coltfrance.com [62.23.67.97])
	by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4A76YJ28974;
	Thu, 10 May 2001 01:06:34 -0600
Received: from b2i-toulouse.com (wilson.b2i-toulouse.com [192.168.0.25] (may be forged))
	by mail.b2i-toulouse.com (8.11.0/8.11.0) with ESMTP id f4A5wOd03448;
	Thu, 10 May 2001 07:58:24 +0200
Message-ID: <3AFA3D6E.C518F97C@b2i-toulouse.com>
Date: Thu, 10 May 2001 09:04:15 +0200
From: =?iso-8859-1?Q?S=E9bastien?= GAUME <sgaume@b2i-toulouse.com>
Organization: b2i-toulouse
X-Mailer: Mozilla 4.75 [fr] (WinNT; U)
X-Accept-Language: fr
MIME-Version: 1.0
To: rtl@fsmlabs.com, rtl@rtlinux.org, yodaiken@fsmlabs.com
Subject: Re: [rtl] Nanosleep and priority
References: <3AF9123A.F7EA2DE1@b2i-toulouse.com> <20010509062023.A10023@hq2>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Well, each time a task wakes up or goes to sleep, it asks for the date. In
fact, I do :

start_time = gethrtime();
nanosleep(&rqtp,&rmtp); // with rqtp.tv_nsec = 2000000
end_time = gethrtime();

That's how I can check when the tasks really wake up and how long they last.
The results show me that they last about the expected 2 ms, that they wake up
every 5 ms and that ... the task with the lower priority level wakes up 20 us
after the other. It makes me think that the first task is still running.

I still don't know what's wrong with that.

Sebastien

Victor Yodaiken a ecrit :

> Are you sure that the first task is still running?
>
> On Wed, May 09, 2001 at 11:47:38AM +0200, S?bastien GAUME wrote:
> > Hello !
> >
> > I've come across surprising results while using the nanosleep function
> > in my realtime tasks. I wrote a program in which two tasks are created.
> > Both are periodic (running under the oneshot mode, period = 5 ms), are
> > supposed to start at the same time and should last 2 ms. One has a
> > greater priority level then the other. And I'm aiming to check if the
> > realtime scheduling works well.
> >
> > What  really surprises me is that the task with the lower priority level
> >
> > always starts about 20 us after the first task ! At that moment, this
> > task is not supposed being able to wake up and to start...
> >
> > I  feel the impression that the realtime tasks behave as if there is no
> > realtime scheduling, although the fifo realtime scheduling should be on
> > and work.
> >
> > So, I you have any idea of what the problem could be,...
> >
> > Thank you
> >
> > Sebastien
> >
> > -- [rtl] ---
> > To unsubscribe:
> > echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> > echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> > --
> > For more information on Real-Time Linux see:
> > http://www.rtlinux.org/rtlinux/
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/