[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom ["Jonas Persson" <jonas.persson@comsys.se>] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom ["Jonas Persson" <jonas.persson@comsys.se>] (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Tue, 29 May 2001 20:20:31 +0200 (CEST)
>From owner-rtl Tue May 29 06:34:40 2001
Received: from kanga.comsys.se (kanga.comsys.ideon.se [194.237.138.68])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4TCYbs25476
for <rtl@fsmlabs.com>; Tue, 29 May 2001 06:34:38 -0600
Received: from zeta (zeta [192.168.0.9])
by kanga.comsys.se (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id OAA04508
for <rtl@fsmlabs.com>; Tue, 29 May 2001 14:29:13 +0200
From: "Jonas Persson" <jonas.persson@comsys.se>
To: "RTLinux Mailing list" <rtl@fsmlabs.com>
Subject: Weird scheduling problem
Date: Tue, 29 May 2001 14:27:13 +0200
Message-ID: <GBEBJEDLOFFHLCHJLHDLOEPECDAA.jonas.persson@comsys.se>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-15"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by hq.fsmlabs.com id f4TCYes25477
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