Design and Implementation of TinyGALS: A Programming Model for ...
Design and Implementation of TinyGALS: A Programming Model for ...
Design and Implementation of TinyGALS: A Programming Model for ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Click router<br />
thread<br />
<strong>TinyGALS</strong><br />
thread<br />
Module A Module B Module C<br />
C1 C2 C3<br />
C4<br />
C5 C6<br />
task invocation<br />
event<br />
Control flow<br />
Data flow<br />
Click<br />
push<br />
Click<br />
pull<br />
<strong>TinyGALS</strong><br />
scheduler invokes module<br />
from event queue<br />
Figure 24: Click vs. <strong>TinyGALS</strong>.<br />
???<br />
task invocation<br />
flow between Click <strong>and</strong> <strong>TinyGALS</strong>. Figure 24 shows a push processing chain <strong>of</strong> four ele-<br />
ments connected to a queue, which is connected to a pull processing chain <strong>of</strong> two elements.<br />
In Click, control begins at element C1 <strong>and</strong> flows to the right <strong>and</strong> returns after it reaches the<br />
Queue. Data (a packet) flows to the right until it reaches the Queue. If we visualize this<br />
configuration as a <strong>TinyGALS</strong> model, with elements C1 <strong>and</strong> C2 grouped into a module A<br />
<strong>and</strong> elements C3 <strong>and</strong> C4 grouped into a module B, then we see that a <strong>TinyGALS</strong> module<br />
<strong>for</strong>ms a boundary <strong>for</strong> control flow.<br />
Note that a compound element in Click does not <strong>for</strong>m the boundary <strong>of</strong> control flow. In<br />
Click, if an element inside <strong>of</strong> a compound element calls a method on its output, control will<br />
flow to the connected element (recall that a compound element is compiled to a chain <strong>of</strong><br />
simple elements). In <strong>TinyGALS</strong>, data flow within a module is not represented explicitly.<br />
Data flow between components in a module can have a direction different from the link<br />
arrow direction, unlike in Click, where data flow is the same direction as the connection.<br />
Data flow between modules is always the same as the connection arrow direction, although<br />
52