🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11920

Re: Poor thread performance on multi-CPU machines

#11920
From: Alan Bellingham
Date: Sun, 11 Jan 2004 13:46
29 lines
2254 bytes
"Michael Powell" <powellmw@comcast.net> wrote:

>This is a common mis-perception. Here is my two cents.
>
>Processes reside on a CPU. 

<cough>

>                           Processes are load-balanced. It just so happens
>that every process has at least one thread running inside it. It also
>happens that each process may contain more than 1 thread.
>
>If what you say is true, then processes would actually be duplicating
>themselves so that they may be load balanced.

Not duplicating themselves - no, that would be wasteful as well as
unnecessary.

When the task scheduler switches which thread is running on a particular
processor, what it does is to load certain registers of that CPU. To
load it onto a different CPU is merely setting the registers of that
other CPU. General memory is shared between the processors - that's the
entire address space used by the process.

Alan Bellingham
-- 
Me <url:mailto:alanb@episys.com> <url:http://www.doughnut.demon.co.uk/>
ACCU - C, C++ and Java programming               <url:http://accu.org/>
The 2004 Discworld Convention                   <url:http://dwcon.org/>
Technical Details
Message-ID: <vgk200lq8sg1o7ns3lok1e15fgm10k4tap@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3fff05ce$1@newsgroups.borland.com> <3fff2f6f$1@newsgroups.borland.com> <pgkuvv0l8c4cdh8anfkjlpq7h86nr6fofd@4ax.com> <21nuvvocnf0eooaevequlp9tds3coikbkl@4ax.com> <4000f1a7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,6aabc16a59635b8c
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-11 06:08:06 PST
From: Alan Bellingham <alanb@episys.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Poor thread performance on multi-CPU machines
Date: Sun, 11 Jan 2004 13:46:36 +0000
Reply-To: alanb@episys.com
Message-ID: <vgk200lq8sg1o7ns3lok1e15fgm10k4tap@4ax.com>
References: <3fff05ce$1@newsgroups.borland.com> <3fff2f6f$1@newsgroups.borland.com> <pgkuvv0l8c4cdh8anfkjlpq7h86nr6fofd@4ax.com> <21nuvvocnf0eooaevequlp9tds3coikbkl@4ax.com> <4000f1a7@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.49.31.105
X-Trace: newsgroups.borland.com 1073828795 62.49.31.105 (11 Jan 2004 05:46:35 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail