[plug] SMP (was: I am mythified by MythTV)

Craig Ringer craig at postnewspapers.com.au
Fri Oct 1 13:10:41 WST 2004


1On Fri, 2004-10-01 at 12:23, Garry wrote:
> > SMP stands for symmetrical multi processing I think.
> 
> Correct

> > It basically /makes/ your computer able to process multiple jobs by 
> > /splitting/ the cpu.  Obviously I'm getting this info from what I 
> 
> No, it allows the operating system to _be_able_ to use multiple physical 
> processors.
> 
> I have heard SMP mentioned in the same breath as hyperthreadng cpus, but 
> haven't looked into the connection.

Hyperthreading is otherwise known as SMT. It lets a single core pretend
to be multiple processors with multiple execution pipelines. My
understanding is that the core can't actually do two things at once.
Rather, it interleaves two jobs to offset the penalty when one of them
does something "expensive" that causes it to have to have to wait (say,
for main memory access) and not use the execution units.

It's also arguably only needed for the P4 because only the P4 pays such
appalling penalties for cache misses and branch mis-predictions. Of
course, that's just my understanding from my reading over time and could
be wildly inaccurate.

If you want to process multiple jobs truly simultaneously, get a
multi-CPU system or multi-core processor. Most people _really_ don't
need one, but having one is awfully nice when compiling things and when
trying to work on a heavily loaded system.

For the rest of us ... well, the kernel does a pretty darn good job of
scheduling access to the CPU so that programs can pretend for most
purposes that they're on their own CPU rather than sharing it with
several other programs. An SMP kernel is not required for this and may
be somewhat harmful if you only have a single CPU, non-SMT system
because of the locking overhead. No forced 'splitting' is required - the
kernel simply switches programs' access to the CPU around so rapidly
that they may as well be running at the same time for all that it
matters.

Finally: please point out any stupid mistakes I may have made. I'm no
expert on this stuff, I just use SMP systems a lot and have come to
understand them and the way the kernel handles them to some extent. I
hope ;-). 

--
Craig Ringer




More information about the plug mailing list