Hi Rob,
this discussion is or sure fascinating, but it could go far beyond the original thread question.
Just a personal (and small) note to clarify to the future readers.
Yes, multi-threading can improve dramatically any program performance IF you can execute parallel threads. This is true for any program, not only network simulators.
Most ns-3 code should be thread-safe, but I haven't seen multi-threading being actively used in the code.
The main problem is about the object status and how locks are used to... lock the objects status if more than one thread is changing them.
Now, in a DE simulation, you can execute threads:
1) in the same event
2) between different events
In the first case there's no problem. it's up to the developer to do it. It is neither suggested or forbidden by ns-3, and most classes are thread-safe.
In the second case there IS a problem, because different events are (usually) belonging to different times. If you have event A and event B scheduled for time Ta and Tb, and you execute them in two different threads, then you must be sure that the global system status observed by event B is not changed by the execution of event A. This is, basically, why MPI in ns-3 is subject to some restrictions (see the MPI manual section).
Again, it's not a problem of "it's useless" or "it's impossible", it's a problem of "it's damn complex".
If someone would be so nice to work on it, it would be a welcome addition for sure. However, the profiling data suggests that the real bottlenecks in ns-3 are elsewhere, and that threads aren't our first priority (note: other people in the ns-3 community can have a different opinion). This (again, it's a personal point of view) is even more important because one simulation doesn't mean anything for most researchers. I need to run Monte-Carlo simulations, so multi-threading is [kinda] useless. My simulations are CPU-bound, and if I have 16 cores, I launch 20 simulations at once. Will multi-threading give some more speed ? Not really.
Anyway, the discussion is interesting but is going off-topic. My suggestion is that if there's enough interest in going multi-thread we should:
1) identify the use-cases
2) move the discussion to ns-dev mailing list (or also there)
3) write down a work plan
Cheers,
T.