[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Wed, 30 May 2001 06:00:22 +0200 (CEST)
>From owner-rtl Tue May 29 16:05:30 2001
Received: from hq2.fsmlabs.com (hq2.fsmlabs.com [209.155.42.199])
by hq.fsmlabs.com (8.11.2/8.11.2) with SMTP id f4TM5Us28937
for <rtl@fsmlabs.com>; Tue, 29 May 2001 16:05:30 -0600
Received: (qmail 27189 invoked by uid 1002); 29 May 2001 21:57:28 -0000
Date: Tue, 29 May 2001 15:57:28 -0600
From: Victor Yodaiken <yodaiken@fsmlabs.com>
To: rtl@fsmlabs.com
Subject: Re: [rtl] Weird scheduling problem
Message-ID: <20010529155728.B27017@hq2>
References: <GBEBJEDLOFFHLCHJLHDLOEPECDAA.jonas.persson@comsys.se>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.15i
In-Reply-To: <GBEBJEDLOFFHLCHJLHDLOEPECDAA.jonas.persson@comsys.se>; from jonas.persson@comsys.se on Tue, May 29, 2001 at 02:27:13PM +0200
Organization: FSM Labs
What version of RTLinux?
Can you describe the code in more detail?
Try with a simpler design
A:
while(1){
sem_wait(s);
do something
}
B:
while(1){
do something
sem_post(s);
clock_nanosleep(CLOCK_REALTIME, ns2ts(10000));
}
On Tue, May 29, 2001 at 02:27:13PM +0200, Jonas Persson wrote:
> Hi all,
>
> I have a strange scheduling problem. Let's say I have two (RTL-) threads, A and B, which interact in the following way - B, which has higher priority, calls sem_wait on a semaphore. Whenever A has one piece of data ready for B, A calls sem_post on the same semaphore.
>
> For whatever reason, when running this example A runs one cycle and so does B. But when I insert another module, being another RTLinux program, whenever usleep() is called from there, both A and B runs another cycle!
>
> Both A and B are periodic processes with the same periodicity, but only A make calls to pthread_make_periodic_np and pthread_wait_np since B waits for the semaphore and has higher priority than A.
>
> Any thought appreciated!
>
> Regards,
> Jonas
>
> ______________________________________________________________________
> Jonas Persson E-mail: jonas.persson@comsys.se
> Project Manager, M.Sc C.Sc&E http://www.comsys.se/
> Comsys AB Phone: +46-(0)46-286 3051
> Forskningsbyn IDEON Fax: +46-(0)46-286 3505
> S-223 70 Lund, Sweden
> -- [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/