[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Schedulers



On Mon, 29 Nov 1999 08:34:12 +0100, Guillermo Rodriguez Garcia wrote: 
>Thanks for your reply. I thought that List was the default
>scheduler (I read this in the ns Docs and didn't look at
>the code in ns-lib.tcl - my fault). Is there any advantage
>in Heap over Calendar?

It depends on the workload.  Probably not much.

>Yes, my requests and responses are going through Tcl, but
>I cannot avoid this, because at each node, each packet is
>processed by running a user-supplied Tcl procedure (this
>is a design requirement). I'm not using TCP; my protocol
>runs over IP.
>
>Any other ideas?

In general we recommend against putting frequently executed code in
Tcl; we try to move all per-packet processing to C++.  (If you've got
short flows, this rule-of-thumb is appropriate there as well.)

But if frequntly running Tcl code is a requirement, your optimization
choices are limited.

Currently ns doesn't know much about tcl-8, if you're invoking tcl
code frequently you may be recompiling it a lot.  I don't know what
kind of callbacks you're doing, but you might be able to make ns call
the tcl bytecodes directly.  This is not for the faint hearted,
though.  (I haven't looked at the details of what would be required.)

   -John Heidemann