[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to use SMP right?



On 7/12/07, Jan-Hendrik Palic <palic@billgotchy.de> wrote:
Hi,

I am not really familar with multiprozessors or multicore systems except
installing a smp enabled kernel and see more then one cpu in
/proc/cpuinfo.

On clustersystems are tools for distributing prozesses to free nodes of
the cluster.
How is it running on single desktopsystems, does the smp enabled kernel
do the work for distributing the prozesses to the prozessors or do I
need to compile my software against special libs to use
multiprozessing/multicoring?

I am asking because I am getting an AMD dualcore Workstation in the next
days and I do not want to use it as a singleprocessor system.

If you have a single process, spreading it across multiple CPUs
requires that the application be designed to use threading.  Many
applications do not do so.  Fortunately, the OS kernel will fairly
happily allocate processes across the CPUs, so that if you are running
multiple processes, you can certainly expect to harness both cores.

This will take place stochastically (randomly) rather than with any
particularly visible determinism, but you can generally expect that on
a desktop system running X, a web browser, a text editor, and (say)
OpenOffice.org, that those four processes will be spread across the
CPUs.

If you do a lot of compiling, you can take advantage of the GNU Make
"-j" option to spawn multiple concurrent processes; those will
certainly be expected to harness multiple CPUs.
--
http://linuxfinances.info/info/linuxdistributions.html
"...  memory leaks  are  quite acceptable  in  many applications  ..."
(Bjarne Stroustrup, The Design and Evolution of C++, page 220)



Reply to: