Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Multi-core and the future

by BrowserUk (Patriarch)
on Sep 04, 2008 at 16:47 UTC ( [id://709059]=note: print w/replies, xml ) Need Help??


in reply to Re: Multi-core and the future
in thread Multi-core and the future

Under Win32 there is an API SetProcessAffinityMask() that allows you to restrict which processor(s) a process can run on. There seems to be a similar call (SetAffinityMask()) on some versions of Linux also.

You would need to write a small command line utility to start the program, get the process handle (probably pid under Linux) and apply the call to it. There may even be existing utilities out there to do this for you.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^3: Multi-core and the future
by rhesa (Vicar) on Sep 04, 2008 at 17:58 UTC
    On linux that would be taskset (part of the util-linux-ng package).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://709059]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-18 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found