discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How is processor time given to blocks?


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] How is processor time given to blocks?
Date: Wed, 21 Jul 2010 10:37:58 -0700
User-agent: Mutt/1.5.20 (2009-08-17)

On Wed, Jul 21, 2010 at 10:15:29AM -0700, Sean Jordan wrote:
> I am fairly new to gnuradio and am working on some of my own blocks. I am
> trying to understand how the blocks are given control of the cpu. I am using
> the grc interface. I currently think that each block runs till it is done
> then gives control to the next block, then when all blocks have run the
> process starts over. However I set some flags that have caused me to
> question that understanding. A better explanation of how the system works
> would be much appreciated.
> 
> Thanks, Sean

This is somewhat simplified, but reasonably close:

  With the thread-per-block scheduler, blocks are "available to
  run" whenever there is input available on its inputs and output
  space available in the downstream buffer.

When the block actually runs is dependent on the underlying OS
scheduler.  In user space, everything is controlled with condition
variables and their associated mutexes.  With the thread-per-block
scheduler there is almost always more than 1 block running
simultaneously. 

Eric



reply via email to

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