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

Re: Multi-core and the future

by dwm042 (Priest)
on Sep 04, 2008 at 15:48 UTC ( [id://709045]=note: print w/replies, xml ) Need Help??


in reply to Multi-core and the future

I'm offering this opinion just to be a little contrary, buuut..

On a desktop, I don't want most apps using every processor they can find. I'd be much happier if they efficiently used one processor. I'd even be happy if they ate up one processor and stuck there. That way I could run my badly behaved app that eats up only one CPU and do the things I like (surfing perl monks, for example) while the badly behaved app beats up one of my cores in the background.

The problem with encouraging applications to seek out new cores, to boldly go where code has never gone before is the crummy programmers who can't write things that coexist with others are going to go take your whole machine because they can.

Replies are listed 'Best First'.
Re^2: Multi-core and the future
by BrowserUk (Patriarch) on Sep 04, 2008 at 16:47 UTC

    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.
      On linux that would be taskset (part of the util-linux-ng package).
Re^2: Multi-core and the future
by Gavin (Archbishop) on Sep 04, 2008 at 16:05 UTC

    "I'd be much happier if they efficiently used one processor"

    There's the rub, they don't seem to be able too, ever tried running Photoshop and Dreamweaver together, I don't know for sure but would imagine they would run better and faster on multicore.

      The question is, would you rather have the application be single-threaded and dragging just one of your processors through the mud, or have it be greedy and multiprocessor aware, so that it can drag all your processors down at the same time? :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-03-28 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found