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

Re: Threads

Michael Day wrote:

> > often inefficient when used for this purpose. However one working thread
> > per processor on an SMP system can certainly be more efficient than a
> > single thread or process labouring away on only one cpu. This leads to a
> Following on to my last post, anyone know of any nasty low-level hacks to
> ensure a particular thread stays on a particular cpu and doesn't hop
> around, trashing cache all over the place?

This is called "thread affinity". I do not remember how to use it in
pthread (or if it is possible with it).

Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi