Just a bit of musing

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Sat Mar 8 09:41:07 CET 1997


:Seeing as most *nix'es don't implement fast RAM sempahores, this can get a
:little expensive at runtime if the contention rate gets high.

AIX has one, called 'cs' for "compare and swap". At work, we've done them
for SunOS, Solaris and HPUX too. Just use the appropriate locking
instructions in a spin-lock, with backoff to an OS call.

:Well, given an SMP machine, with an OS that will intelligently distributes
:threads -- that all semi happens for free with me (its not quite so good
:as I try to minimise thread creations, as few to no current OS'es will
:migrate a thread across processors for load sharing).

Huh? As far as I know, all SMP OS's will readily run a runnable thread
on whatever CPU is free in the SMP. Solaris, AIX4, HPUX all do this, and
I have no reason to believe any other wouldn't as well. Are you suggesting
that once a thread in a process has run on a given CPU, it is somehow
bound to that CPU for execution? If so, can you point me at some docs that
say this - it could be quite significant for us at work.

--
Chris Gray   cg at ami-cg.GraySage.Edmonton.AB.CA



More information about the mud-dev-archive mailing list