Sign in to follow this  

process / thread control on multi-core cpus'

This topic is 4088 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

This topic is 4088 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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