Hi Dingrong,
Tuesday, November 14, 2000, 6:35:55 AM, you wrote:
DY> I have some questions concerning the communications between user space
DY> program and the rtlinux program by fifo.
DY> Consider such a scenerio, one rtlinux's program and one normal linux
DY> program. The rtlinux program write to a fifo with
DY> very high rate a structure, and the fifo is created to be the same size
DY> as that of the structure. The user program read the same structure from
DY> that same fifo.
DY> What will happen that during the user program is reading from
DY> the fifo when rtlinux program come and take the resource over ? I can not
DY> imagine how this issue be dealt with rtlinux.
i think, you have to be aware that it is not guarantied that you
always get your data out of the fifo (uncrippled). IMHO the rtlinux
task could preempt the userprocess while it is reading the fifo.
DY> Another issue, consider again a rtlinux process, and a normal process.
DY> This time the normal process write a structure to a fifo and the rtlinux
DY> read it. What will happen that when the linux process only write half of
DY> the fifo when the rtlinux come to read it?
same as above ...
DY> Are such issues are considered already by rtlinux kernel or the user (like
DY> me) of rtlinux should take care of it ?
i think you have to consider some kind of resource locking - or just
increase the size of your fifo. thus it is not so important that the
tasks read the data all at once. but you could run into the capacity
of your fifo, depending on the period of your realtime task.
* you might have a look at the rt_fifo package from zentropics. i think
i saw some semaphore functions in it.
* you could implement your own kind of locking (e.g. shared mem?)
...
CU
Alexander mailto:[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/