Re: About Parallelism
- From: "Scott J. McCaughrin" <sjmccaug@xxxxxxxxxxxxxxx>
- Date: Wed, 18 Jul 2007 14:12:42 +0000 (UTC)
Iwo Mergler <Iwo.Mergler@xxxxxxxxxxxxxxxxxxxx> wrote:
Thank you, Iwo. You are quite correct: the objdump's did not reveal any
direct parallelism, though I can't speak for the syscalls.
I was well aware of watching execution profiles, so perhaps I should
have asked: how to ensure that mmulti-threading will assign multiple
CPU's to my threads? But you have now answered that question as well.
Thanks again,
Scott
=============
: Scott J. McCaughrin wrote:
: > I have a multi-CPU machine, but I suspect my compilers may not be
: > taking advantage of parallelism. Yes, I am doing penty of multi-
: > threading, but how can I make sure that the implementation is
: > actually making use of the multiple CPU's (Xeons)?
: > As a brute-force approach, I could 'objdump' my pthreads library
: > and study its gas code to see what happens. Is there a less tedious
: > alternative?
: >
: > Thanks, Scott
: Hi Scott,
: you will not find any parallel magic in the objdump output.
: Modern PC processor cores depend on deep pipelines and caches
: for their performance. This makes it very expensive to split
: a program across multiple cores in the way you seem to expect.
: Thus, compilers for PCs compile programs for a single core.
: The parallelism is implemented by the OS at thread/task level.
: If you have a multi-threaded program, the OS will distribute
: the active threads over different cores.
: Please note the keyword here is 'active'. Most programs have
: rarely more than two active threads at any time.
: As Josef said, if your aim is to load all your CPUs to 100%,
: write a bunch of computing threads, each operating on their
: own variables and without I/O. The OS will distribute them
: among the cores.
: The world you described, where the compiler extracts intrinsic
: parallelism from a program and distributes it across cores,
: does indeed exist. These methods are used heavily with vector
: processors, signal processors, media processors, GPUs, etc.
: These architectures are specifically designed for fine-grained
: parallelism. PCs are not.
: Kind regards,
: Iwo
--
Scott McCaughrin
.
- References:
- About Parallelism
- From: Scott J. McCaughrin
- Re: About Parallelism
- From: Iwo Mergler
- About Parallelism
- Prev by Date: Re: How to set timezone
- Next by Date: Re: How to set timezone
- Previous by thread: Re: About Parallelism
- Next by thread: Newbie: allocating aligned physically-contiguous memory?
- Index(es):
Relevant Pages
|