Sign in to follow this  
pcxmac

process / thread control on multi-core cpus'

Recommended Posts

Is there a way to control which core a certain thread remains resident on, with out going in to assembler or what not? I am not really familiar with how the windows operating system schedules threads accross multiple cpus'/ cores. I am fairly confident any given process can run its share of threads accross many cores, and I am looking to control which cores or central processing entities execute threads. My goal is to kind of have my own thread scheduling scheme { time sharing and core settings }, that doesnt go so deep that it would require re-write on different hardware / platforms. Pretty much sitting on top of the OS. I have a feeling that Windows doesnt like what im thinking though. I havent looked to much in to the unix - process model though, enough to understand thread scheduling.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You can use SetThreadAffinityMask to do what you want on Windows. There are similar functions available on unix. However, its pretty rare to actually have a good reason to want to do this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this