discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] a criticism to GNURadio's scheduler!


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] a criticism to GNURadio's scheduler!
Date: Sun, 01 Jun 2014 11:13:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Mostafa,

I know you've been working many hours on this :) so don't worry, you're
being heard.

Nevertheless, GNU Radio is surely not calling the asking the source
"crazily" to produce items.

GNU Radio is a streaming-into-buffers architecture, which means that the
runtime will ask a source to produce output when there is space in the
output buffer. I fail to see the problem with this, since your source
can just take as much time as it wants to finish a work call, can
produce less than noutput_items, and generally should just be as fast as
it could. Not a single one of the items it produced is going to waste!

It is good practice and done by *every* externally rate-limited source
to just block in work until enough items can be produced. If you need to
wait to get more random seed, well, then wait in work(). I admit, that
gets a little tricky when you want your seed to come in using a message,
because messages are not going to disturb your work due to design for
thread-safety.

But then again, before I start proposing wait-notify/condition
multithreading methods, I'd like to hear a bit about your source and why
being called often is a problem; that's usually not the case, so chances
are we might help you find a solution if we understood what's wrong with
your source ;)

Greetings,
Marcus

On 01.06.2014 10:56, Mostafa Alizadeh wrote:
> Hi Mike,
>
> No, the throttle isn't a source! It just controls the flow of items in an
> specific time interval. I don't want this! I want cognitively tell the
> source produces the random bits after some special procedures have done (a
> message can do this for the source). But the scheduler crazily wants the
> source to produce items! :)
>
> How could I deal with this problem?
> please.
>
> Best,
>
>
>
> On Sun, Jun 1, 2014 at 1:18 PM, Mike Jameson <address@hidden> wrote:
>
>> The "Throttle" block is required if you are not using any external
>> hardware:
>>
>> http://gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1throttle.html
>>
>> Mike
>>
>> --
>> Mike Jameson M0MIK BSc MIET
>> Ettus Research Technical Support
>> Email: address@hidden
>> Web: http://ettus.com
>>
>>
>> On Sun, Jun 1, 2014 at 9:30 AM, Mostafa Alizadeh <address@hidden>
>> wrote:
>>
>>> Hi,
>>> I worked on GNURadio for many hours. After all, I prepared my blocks in
>>> c++. However, the source by which I produce random bits (items with
>>> sizeof(char) ) doesn't work properly! By properly I mean, I wanted GNURadio
>>> to lead me control how it's going to call the *source.* It's crazily
>>> calling the random bit generator so many times.
>>>
>>> I think this is because of the GNURadio's strategy for executing blocks
>>> to achieve as maximum throughput as possible! So GNURadio translates it*
>>> to call the source as much as possible*.(no matter what is the source,
>>> here is the random bit generator)
>>>
>>> Am I right? If I am, what is the solution?
>>>
>>> Best,
>>> Mostafa
>>>
>>> _______________________________________________
>>> Discuss-gnuradio mailing list
>>> address@hidden
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>
>>>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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