[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] noutput_items in every block
From: |
Michael Dickens |
Subject: |
Re: [Discuss-gnuradio] noutput_items in every block |
Date: |
Mon, 01 Jan 2018 11:06:23 -0500 |
Hi Sakthivel - Short answers: The value can vary for each call; it is
determined by the scheduler. I've provided more info below if you're curious.
Cheers! - MLD
Details: One way to think of your questions is to imagine the finite-length I/O
buffers that hold the data between blocks, and note that, in general, it is
more CPU efficient to process "more" data than very small chunks -- typically
1k of data can be handled more efficiently than 4 bytes, when you consider the
CPU overhead required for the scheduler (this is true up to some "large" data
amount, when processing efficiency peaks and possible even drops somewhat off
of peak). When the flowgraph starts, these buffers are all empty; so the
scheduler tries to get blocks to process as much input data as possible. Once
the flowgraph is running, the buffers hold (for all practical purposes) random
amounts of data, which means that the blocks (in general) will not be able to
process the amount of data as at startup time. Data will flow roughly in bursts
from source to sink, but since each block is executing in its own thread the
end result is data pipelining: "work" for any specific block happens when there
is simultaneously "enough" input data and "enough" output buffer space --
combine the "note" above with this concept and you have a rough interpretation
of the scheduler algorithm. Thus, with data streaming the scheduler has to be
able to work with dynamic amounts of I/O data / buffer space.
On Mon, Jan 1, 2018, at 10:30 AM, Sakthivel Velumani wrote:
> I am new to GNU radio. I have this general doubt that when items are streamed
> from one block to another, how many input_items per port (consider a type
> general block) are passed when the work() function of the block is called
> each time? I guess this is handled by the GNU radio's scheduler but would
> like to know if this is constant or it varies for each call?