Hi,
Is it possible to bind a cpu to a thread/process?
More like Bind_thread(cpu id, thread name etc)
I have seen this API some where in POSIX way back 2003/2004
http://lists.freebsd.org/pipermail/free ... 29012.html
However most of these too bind it to a "pseduo CPU" which is actually an OS abstraction, not a real cpu core.
selecting a CPU for a thread/process
-
- Enthusiast
- Posts: 443
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Re: selecting a CPU for a thread/process
+1
Could be very useful, provided it's also possible to determine which processor the main thread is running on.
Could be very useful, provided it's also possible to determine which processor the main thread is running on.
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: selecting a CPU for a thread/process
Intel have a lot of stuff on this (surprise surprise) but their website is very hard work.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: selecting a CPU for a thread/process
On Windows maybe SetThreadAffinityMask / SetProcessAffinityMask can do what you ask.
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: selecting a CPU for a thread/process
Why do you want to do this?
quidquid Latine dictum sit altum videtur
-
- Enthusiast
- Posts: 443
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Re: selecting a CPU for a thread/process
In my app (Show Cue System) I have a control thread that primarily monitors cues being played, and triggers auto-start cues when required. There is also a 'blending' thread for cross-fading images, and a thread for buffering files. There are also some other threads for lesser used activities (such as for handling network activity), but probably the thread that has the most visual impact is the blending thread. I do usually get a smooth cross-fades even now, but I would expect that cross-fades would be consistently smooth if I could assign this thread to a different processor to that running the control thread or the buffering thread (assuming the PC has multiple processors).freak wrote:Why do you want to do this?