Unix Programming - process/thread & processor

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > December 2007 > process/thread & processor





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author process/thread & processor
kasthurirangan.balaji@gmail.com

2007-12-13, 7:33 am

Hi,

Our system has 4 processors. We do not use threads. We use forks. Just
by using forks, can we guarantee that all the 4 processors are
utilized appropriately or do we need to use threads for it?( We know
that forks are costly). Is there a way to check programatically the
utilization of the processors?

Thanks,
Balaji.
Mikko Rauhala

2007-12-13, 1:24 pm

On Thu, 13 Dec 2007 05:06:18 -0800 (PST), kasthurirangan.balaji@gmail.com
<kasthurirangan.balaji@gmail.com> wrote:
> Our system has 4 processors. We do not use threads. We use forks. Just
> by using forks, can we guarantee that all the 4 processors are
> utilized appropriately or do we need to use threads for it?


Neither multiple processes nor multiple threads guarantee this;
however, both make it very likely (that is, you'll get appropriate
utilization if the scheduler is doing its job sanely, which includes
for example not swapping processes between processors for nothing).

In short, you should be fine, or if you're not, at least it's not the
fault of using multiple processes as such.

--
Mikko Rauhala - mjr@iki.fi - <URL: http://www.iki.fi/mjr/ >
Transhumanist - WTA member - <URL: http://transhumanism.org/ >
Singularitarian - SIAI supporter - <URL: http://singinst.org/ >
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com