Mon, 10 Jul 2000 b m ledvina wrote:
[...]
> So, my question is... am i doing something drastically wrong, or should
> i look for another way of implementing this functionality (i.e. reading
> of the FIFO only when data is present and letting the app do what it
> needs to in the meantime)

Well, that's the easy way, but an application of mine has a serious problem
with it: It's using GGI for rendering (to just about any target), but when it
switches to SCHED_FIFO (Linux/lowlatency) for measuring data, it has to stay
away from GGI, or the system will freeze. (This seems to be a problem with
SCED_FIFO and SCHED_RR in general; my guess is that when communicating with X
and similar servers, short-term  deadlock-like situations may occur, which is
normally not a problem, but results in a total user space freeze if one of the
threads involed is a real time thread, and thus won't yield unless it wants to.)

As to the blocking of the entire process; can't help you there, except for a
few suggestions:

* Check that your other thread(s) aren't blocking on the FIFO
  accessing thread indirectly. (This can happen easily when
  dealing with various mechanisms like semaphores and FIFOs in
  between the threads.)

* Check the initialization of your FIFO thread. What does it share
  with the parent thread? (The low level Linux API uses a single
  call for fork() and the POSIX threads, which lets you pick and
  chose as you like among context, stack, memory etc.)

* Check the blocking code in the kernel RTL FIFO driver. (Not that
  I suspect anything, but that's about the only other place I could
  think of that could possibly cause more than one thread to sleep
  on the same kernel call.)


David Olofson
 Programmer
 Reologica Instruments AB
 [EMAIL PROTECTED]

..- M u C o S --------------------------------. .- David Olofson ------.
|           A Free/Open Multimedia           | |     Audio Hacker     |
|      Plugin and Integration Standard       | |    Linux Advocate    |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
..- A u d i a l i t y ------------------------. |        Singer        |
|  Rock Solid Low Latency Signal Processing  | |      Songwriter      |
`---> http://www.angelfire.com/or/audiality -' `-> [EMAIL PROTECTED] -'
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to