How can I specify processor affinity?

Posted by BenAlabaster on Stack Overflow See other posts from Stack Overflow or by BenAlabaster
Published on 2010-05-31T16:39:32Z Indexed on 2010/05/31 16:43 UTC
Read the original article Hit count: 189

Filed under:
|
|
|

I have an application that's having some trouble handling multi-processor systems. It's not an app that I have a particular affection for modifying and would like to avoid it if possible. However, I'm not above modifying the code if I have to. The application is written in VBA (and hence my inclination to avoid touching it).

We've noticed that the application seems to run pretty smoothly if we set the processor affinity to a single processor using task manager, only manifesting instability when processor affinity isn't set.

I know that I can specify the processor affinity of a task using .NET and as such, there lies a possibility of me writing a shell application that could be used to run legacy applications with a specified processor affinity, does anyone have any experience with this and can throw out some ideas as to headaches I'm likely to run into with this approach?

The other question is: Is it in fact possible to modify the core VBA product to handle its own processor affinity? I've never had to handle this with any of my applications natively so this (at this point in time) is completely outside my realm of expertise.

Thanks in advance

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET