[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] file source/sinks and named pipes

From: Achilleas Anastasopoulos
Subject: [Discuss-gnuradio] file source/sinks and named pipes
Date: Sat, 8 Oct 2011 01:33:09 -0400

I have tried the following experiment that generated a couple of
puzzling questions for me...

A graph consisting of
a sinusodial source, a file sink and a graphical fft sink (connected
to the source).
NO THROTTLE is present in this graph

A separate graph with a file source, a THROTTLE at 100K
and a graphical fft sink

I creat a named pipe with
"mkfifo myfifo"
and both tx and rx are writting/reading to/from this pipe.

I run first the rx file and then (in a separate shell) the tx file.
Everything works as expected, ie both graphs seem to be working at the same
rate. The reason (as I understand it) is the the rx file (containing
the throttle)
consumes data from the fifo at 100K and this INDIRECTLY sets the rate of the tx
due to blocking of the tx when the fifo fills up (I read that Linux
has a 64K buffer for the fifo).
This is also evident from the system load which stays relatively low.

Q1: Is this the reason the two grahs are synchronized, or is it that
the throttle in the rx DIRECTLY sets the rate for the tx?

Now I do the following:
I stop the rx for roughly 10seconds and then I restart it.
During those 10 seconds the system load shoots to 100% which is to be expected
since the tx does not have any throttle...
However I would ALSO expect that during those 10seconds the pipe
buffer fills up and
it blocks the tx, and so the tx eventually stops and waits for the rx
to be restarted and start consuming samples from the pipe, which is
somethig I do not observe!!!
Instead what I see is that the moment I restart the rx the load drops
somewhat for about 90seconds and then drops furthermore to the
original levels (observed when both rx and tx are running).

Q2: what happens to the tx and the named pipe when i stop the rx? and
why does in not fill and stop?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]