Subj : Re: Binding a thread to particular processor Linux To : comp.programming.threads From : doug Date : Wed Mar 23 2005 06:14 pm To answer my own question, sched_setaffinity allows you to set processor affinity. I've managed to find object code on a 2.4 system with this function, and it seems to work. It also seems to provide thread affinity - at least the benchmark results change as I assign different threads to different processors, so i seems to be affecting per-thread, rather than just per process. Does this surprise anyone? Now I'm stuck on setting interrupt affinity. Anyone know how to do this? Or does sched_setaffinity do this for me? I should mention I'm un user space, and not kernel space, so don't have access to set_cpus_allowed() "doug" wrote in message news:xj%%d.107897$ug2.106532@fe2.news.blueyonder.co.uk... > Hi guys, > > Is is possible (with a standard 2.4 kernel and pthreads) to bind a thread > to a particular processor? > > I've found reports on the web that say this is impossible with 2.4, but > there's a kernel patch/project which provides it (pset). However, my > (suspect) memory keeps telling me that I've seen such code (probably on > the web) before. > > Off to look further, but any help greatly appreciated. Cheers, > Doug > .