Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I let my family members use my pc over rdp to play their flash-based games as their laptops overheat if they use them directly. I have it setup so I can use the pc at the same time as them. The pc has a quad core cpu and I would like to be able to assign one of those cores to the user logged in via RDP so that the other 3 cores are left alone. Is this possible?

They login via a specific user account setup for the purpose.

Thanks for any advice!

share|improve this question

migrated from stackoverflow.com Feb 27 '11 at 14:30

This question came from our site for professional and enthusiast programmers.

    
Maybe PsTools from Mark Russinovich at technet.microsoft.com/en-us/sysinternals/bb896649 could help you ;) –  ATorras Feb 27 '11 at 15:52
add comment

3 Answers

up vote 1 down vote accepted

The Windows function SetThreadAffinityMask allows you to set the processor/core affinity of a thread. So with this function you can instruct/force a thread to use one specific core.

To solve your problem, do the following:

  • Write an application that loops over all processes and checks the user
  • If the user of the process equals the username given as argument to the application:
    • loop over all threads
    • set the affinity to the first core

You can give this application a nice windowing front-end, and run it automatically as soon as you log in to your computer.

You could also make this application a Windows service, and have it run automatically if the computer boots up.

share|improve this answer
    
Sounds like a great solution and a fun project! I'll give this a go and release the software when finished. Thanks :) –  Dean Ward Feb 27 '11 at 14:55
add comment

This is not a simple solution but the best way to completely split the computer in to two (ore more) computers using VM (Virtual machine) software. This will solve your problem might solve future related issues as well (Junk, viruses...)

With VM installed you can choose how much CPU processing time each computer will get. This selection also works for other resources like memory, disk space, network bandwidth...

If you choose to do this, better make sure that your CPU supports Virtualization.

share|improve this answer
    
I did try going down the VM route but found it gave a lot more overhead than the way I'm doing it now. –  Dean Ward Feb 27 '11 at 13:18
add comment

There are a number of things here. Simplest solution would be to get it working on the laptop would it not?

  • Perhaps there is a problem with the laptop hardware, the fan?
  • You could try underclocking the laptop to reduce the running temperature.

If you're set on the RDP idea you could try:

  • reducing the process priority for rdp in the task manager. (I don't have windows 7, so I'm unsure whether this runs as a seperate process.) I think this should have a similar effect to what you're after. If rdp is running as a service, there probably is a way to reduce it's priority, but it isn't as straight forward I would imagine.
  • you could also try changing the process affinity in the task manager, I think using this you could assign rdp to exactly one core, but, again, it depends on whether rdp is a service as to how easy it would be to do this.
share|improve this answer
    
The laptop in question is old and underpowerd. It already runs really slowly so underclocking it would probably not be an option. I'll try to find the rdp service's proces and set the afinity on that though, thanks for that suggestion! –  Dean Ward Feb 27 '11 at 13:19
    
found the process hosting the service and set it's afinity to a single core but the game's process still ran on other cores. Looks like this is going to be a no starter! thanks anyway. –  Dean Ward Feb 27 '11 at 13:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.