# Scheduler Question

**URL:** <https://www.ruby-forum.com/t/scheduler-question/226969>\
**Category:** GNU Radio\
**Created:** [February 27, 2013, 7:56am UTC](https://www.ruby-forum.com/t/scheduler-question/226969 "2013-02-27T07:56:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Almohanad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@Almohanad\_F](https://www.ruby-forum.com/u/Almohanad_F)\
**Post date:** [February 27, 2013, 7:56am UTC](https://www.ruby-forum.com/t/scheduler-question/226969/1 "2013-02-27T07:56:13Z")

</div>

I’ve been reading through the code in gnuradio-core/runtime for a few  
days  
to understand the internal workings of the gnuradio scheduler. It seems  
to  
me that gnuradio was originally based on a synchronous dataflow (sdf)  
model  
of computation and the single thread schedule is an SDF sequential  
runtime  
schedule, or a periodic admissible sequential schedule (PASS), and the  
thread per block schedule is a parallel SDF scheduler, or a parallel  
admissible parallel schedule (PAPS).

Does this sound like an accurate description of the schedulers and  
underlying gnuradio model of computation or am I reading too much into  
it?  
thanks

---

<div class="post-metadata">

**Author:** ![Almohanad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@Almohanad\_F](https://www.ruby-forum.com/u/Almohanad_F)\
**Post date:** [February 27, 2013, 3:08pm UTC](https://www.ruby-forum.com/t/scheduler-question/226969/2 "2013-02-27T15:08:06Z")

</div>

Hi Almohanad - From my (now old) memory of the GR runtime scheduler (STS  
and TBP), I believe you are roughly correct in the technical  
terminology, except that the schedules are not guaranteed to be  
periodic. They are opportunistic / aperiodic: process as much data as  
“makes sense” given the blocks constraints and how much data is  
available and how much output space is available. Tom (et.al.) have  
done some work on the TBP scheduler more recently than my memories, so  
maybe they have been tweaked to be truly periodic?

That said, I do not believe either scheduler was created specifically  
with those terms or concepts in mind; I believe the current scheduler(s)  
were programmed as they are because they work well and were original  
creations. They might have been influenced by reading others works on  
SDF and the like, but I really doubt there was any true intent on  
recreating others works.

Again, these are memories that I believe are correct; but then who  
knows. I believe Eric B. wrote both of the schedulers, and he’s no  
longer around on this list to answer more officially (though I  
understand that folks do interact with him in person). - MLD

---

<div class="post-metadata">

**Author:** ![Almohanad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@Almohanad\_F](https://www.ruby-forum.com/u/Almohanad_F)\
**Post date:** [February 27, 2013, 3:58pm UTC](https://www.ruby-forum.com/t/scheduler-question/226969/3 "2013-02-27T15:58:58Z")

</div>

On Wed, Feb 27, 2013 at 9:06 AM, Michael D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi Almohanad - From my (now old) memory of the GR runtime scheduler (STS and  
> TBP), I believe you are roughly correct in the technical terminology, except that  
> the schedules are not guaranteed to be periodic. They are opportunistic /  
> aperiodic: process as much data as “makes sense” given the blocks constraints and  
> how much data is available and how much output space is available. Tom (et.al.)  
> have done some work on the TBP scheduler more recently than my memories, so maybe  
> they have been tweaked to be truly periodic?
> 
> That said, I do not believe either scheduler was created specifically with those  
> terms or concepts in mind; I believe the current scheduler(s) were programmed as  
> they are because they work well and were original creations. They might have been  
> influenced by reading others works on SDF and the like, but I really doubt there  
> was any true intent on recreating others works.
> 
> Again, these are memories that I believe are correct; but then who knows. I  
> believe Eric B. wrote both of the schedulers, and he’s no longer around on  
> this list to answer more officially (though I understand that folks do interact  
> with him in person). - MLD

Yeah, that about sums it up from my understanding of the history, too.  
The single-threaded scheduler was basically a dataflow model and I’m  
sure Eric used that concept to inform his design.

When it comes to the TPB scheduler, the task was to make GNU Radio  
multi-threaded. So Eric adapted the STS one and rethought how it could  
work in parallel with some push-pull concepts about how much data is  
available on the input versus how much buffer space is available on  
the output. At this point, I’m not sure any strict concepts of  
scheduler theory were necessarily adhered to, though it wouldn’t  
surprise me to learn that it’s similar to some standard model(s) of  
computation (Eric has a long history in that area, so he would be well  
aware of the various concepts, models, and ideas).

Tom
