> I am working on the network code of ruby. And I have several questions on
> it.
>
> Firstly, I noticed that the SimpleNetwork, the PerfectSwitch and the
> Throttle all defined several MessageBuffer Vectors. Messages were
> transferred among these MessageBuffers. I was wondering that the
> MessageBuffers in PerfectSwitch and Throttle were only private copies of
> MessageBuffer defined in SimpleNetwork or they were independent
> MessageBuffers used to transferred messages. Were all the MessageBuffers
> defined in *.sm files, were not they?
>
MessageBuffers are all over the place. They are in Slicc-defined
controllers, in Throttles, and in PerfectSwitches. Messages traverse a
series of MessageBuffers until they reach the endpoint.
> Secondly, I noticed that when PerfectSwitch->addInPort and
> Throttle->addLinks they set them selves as the Consumers of the
> MessageBuffers. And when a message was enqueued to a corresponding
> MessageBuffer, it would wakeup its Consumer. Am I right?
>
Thats correct.
--Mike
|