[Xorp-hackers] Multithreading routing process

Rafael Paoliello Guimaraes rafael.guimaraes@ac.upc.es
Fri, 12 Nov 2004 13:33:04 +0100


I am migrating a multithreading routing process implementation to XORP 
and, since XORP does not support multithreading, I was thinking about 
building a communication thread that receives requests from every thread 
of the routing process and converts this to XRL calls. In order to do 
this, I though about a FIFO that could store requests from every thread 
and the communication process simply processes the requests one by one.

Ok, this seems to solve my problem (or not?)... However, in order to 
process these requests, the only thing the communication thread does is 
to run the eventloop with a periodic timer that calls a function to 
process any request that is present in the FIFO. This causes a little 
delay in the processing of requests (such as sending a control packet, 
for example). If use a small period for this event, this should not be a 
problem, however I was thinking if there is any way to process the 
requests as soon as they are available. Can I, for example, schedule an 
one-off event (with a time-out equal to zero or close to zero) whenever 
a new request is available in the FIFO? This would be done concurrently 
to the eventloop execution. Would this work? Or should I forget this and 
keep on my original solution? Or even the original solution is not good?



  Rafael Paoliello Guimaraes
  PhD Student - Computer Networking Group
  Department of Computer Architecture (DAC)
  Polytechnic University of Catalonia (UPC)
  Phone: +34-934017187   Fax: +34-934017055
  URL: http://people.ac.upc.es/rpaoliel