On Wed, Apr 04, 2001, Takashi Ishihara wrote:

> I wonder what exactly is matrix dispatching scheduling described in the
> pth manual. I looked up the term in various textbooks and online search
> engines, but I could not find anything related to scheduling. If there any
> articles or textbooks related to this topic along with sample/psude code?
> TIA.

This is no standard term. You can also call it "state machine based
dispatching" or "internal multiplexing" or whatever else people call it.

Functionality wise it means that the application splits its operations into
small units and then remembers these units and their order in a data structure
(the matrix or state table). Then under run-time the application creates
multiple threads of execution by multiplexing the operations, i.e., it
performs a few units of operation A, then a few units of operation B, then
perhaps again a few units of operation A again, etc. And at each dispatching
it remembers what to do next in the data structure. 

Actually that's the same what Pth internally does for its threads. The state
here is mainly the machine register contents and the run-time stack of a
thread. The difference is just that Pth hides this behind a procedural API
while with the other approach the application explicitly performs all actions.
The disadvantage is that it often makes the application horribly complex
because you no longer see obviously the path of execution.  For a life
example look at Squid, the Web proxy. 

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to