Tuesday, November 01, 2005

DUAL-CORE PROCESSOR PC

I mentioned at the last meeting that arrival of my new PC was imminent. Herewith a short summary of its success. The functioning of its dual-core processor was an unknown quantity for me hitherto, so I sought advice from the CiX bulletin board. The most useful responses follow.

I do apologise if readers really wanted the Moores' super photos left at the top of the blog ........ realise this text stuff is a bit bland .... :-(

ROOT MESSAGE FROM ME
"Dual Processor CPU functioning
Education, please:-

Been using my NEC Athlon dual-processor PC for a couple of weeks now. Bought the machine commended in the PC Pro November issue, mainly because of the very low noise level spec.

It's terrific - seriously fast and VERY quiet! What fascinates me is the way the machine will do simultaneously a full virus check (AVG), full spyware check (Spyware Doctor) PLUS my other interactive work (WP, database, photo-editing ....) without a hint of the slowing down of the latter which occurs under the same load on my other (nominally FASTER)single core CPU machine. The only symptom of this heavy, simultaneous loading of the NEC is the HDD, which sounds as if it's working hard to serve all masters! (It's actually re-assuring to hear SOMETHING working in the machine, the rest is so quiet!!) Clearly the parallel working is in full swing.

In words of not too many syllables, WHERE please in the system are the decisions being made as to which CPU core handles which operation? Was WXP Home (which I use) designed already with dual-core in mind, or is it the CPU itself, or is this management carried out somewhere in the mobo?

Keith Drury (very satisfied at yet another successful take-up of a PC Pro recommendation)"

RESPONSES
FROM JON HONEYBALL
(Windows expert in PC Pro)

"> Was > WXP Home (which I use) designed already with dual-core in mind

Yes

>, or is it

> the CPU itself,

Yes

> or is this management carried out somewhere in the mobo?

No

Jon Honeyball"

(Sic. Well, I did ask for words of not too many syllables!!)

-----------

FROM JOHN RENNIE

"The thing that uses processor time is an object called a thread. All processes have at least one thread (otherwise they couldn't do anything :-) and many use more than one thread so they can (apparently) do two things at the same time.

Which thread gets executed next is managed by the NT/2k kernel. The rules for executing threads are a bit involved, but basically there is a thread queue in which all threads wait. When a processor becomes available the kernel looks at the queue and takes the thread at the beginning of the queue and starts executing it. The thread runs for a set time, then stops being executed and joins the back of the queue.

To complicate matters a bit, threads have a priority and threads with the highest priority are executed first, in effect jumping the queue past threads of lower priority.

With two or more processors the kernel works just as above, expect that it can execute two or more threads at the same time.

A thread remembers which processor it ran on last time, and if possible the kernel will execute it on the same processor as last time. This is because that processor may well have some of the threads working memory still in the processor cache, and this speeds up starting the thread. If other higher priority processes are using all the processors the kernel will just execute the thread on whatever processor becomes available next. Under appropriate circumstances e.g. if only one thread is using lots of CPU you can often use PerfMon to watch the thread bouncing between processors every few seconds.

Normally a thread only runs for 100 milliseconds or so before it gets kicked off the processor and the next thread gets its turn. That makes the running of several threads seem smooth even when there is only one processor. However there are circumstances where a thread cannot be stopped. This typically happes if the thread has called into a device driver and the driver cannot be interrupted until it has finished what it's doing. I've seen this when copying a large file over the network with a 1Ghz network controller, and it makes the PC feel a little sluggish. With more than one processor the problem is largely alleviated, and this is why multiple processor machines feel more responsive even when the aggregate CPU is not actually that great.

JR"

1 Comments:

Blogger Roger said...

Well, I'm sure that's quite clear to all of us in Weston U3A, isn't it?

8:58 pm  

Post a Comment

<< Home