On Tue, Nov 14, 2000 at 12:35:55AM -0500, Dingrong Yi wrote:
# Hello everyone,
# 
# I have some questions concerning the communications between user space
# program and the rtlinux program by fifo.
# 
# Consider such a scenerio, one rtlinux's program and one normal linux
# program.  The rtlinux program  write to a fifo with
# very high rate a structure,  and the fifo is created to be the same size
# as that of the structure. The user program read the same structure from
# that same fifo. 
# 
# What will happen that during the user program is reading from
# the fifo when rtlinux program come  and take the resource over ? I can not
# imagine how this issue be dealt with rtlinux. 

i guess, this is not going to happen. because linux(and all processes run within it) 
and realtime tasks are scheduled so that when one runs the other is suspended. linux 
itself is a lowest priority thread, and as long as there will be any realtime task 
executing, linux won't run (won't get any cpu time share). saying `linux' i mean linux 
kernel processes and userspace processes as a whole.

# Another issue, consider again a rtlinux process, and a normal process.
# This time the normal  process write a structure to a fifo and the rtlinux
# read it. What will happen that when the linux process only write half of
# the fifo when the rtlinux come to read it? 
the rtlinux task will read all the data available with no exception. rtf_get() 
function returns number of actually read bytes, which could be less than 
sizeof(your_structure).
btw, the same with writing to fifo: if your linux process writes data at high rate and 
the fifo size is the size of structure, the following could happen: if your linux 
process won't readthe fifo fast, the rtlinux process may not be able to write to the 
fifo at some point, because it will be full.


# Are such issues are considered already by rtlinux kernel or the user (like
# me) of rtlinux should take care of it ?
i think that abovementioned issues are handled by kernel.

rgds, 
Denis.

-- 
  ("\''/").__..-''"`-. .         [EMAIL PROTECTED]
  `9_ 9  )   `-. (    ).`-._.`)  http://www.lut.fi/~karpov/
  (_Y_.)' ._   ) `._`.  " -.-'   +358 (0)40 502 0931
   _..`-'_..-_/ /-'_.'           Lappeenranta University of Technology
 (l)-'' ((i).' ((!.'             
  *** Sorry, I don't date outside my species.  ***
-- [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