Article View: aus.computers.linux
Article #238Re: Dual processors ?
From: Lee Sau Dan
Date: Fri, 10 Jan 2003 08:09
Date: Fri, 10 Jan 2003 08:09
71 lines
4258 bytes
4258 bytes
>>>>> "warr" == warr <warren22432@yahoo.com> writes:
warr> if a program is written for single CPU only, even though
warr> your OS is coordinating the 2 cpus and this program may be
warr> running on 2 cpus, but they are not running
warr> concurrently. they are still sequential processing.
Right.
warr> and the kernel has to switch between the 2 CPUs for 1 single
warr> process.
Why? A smart OS (e.g. Linux) will schedule the CPUs wisely, so that
one single CPU serves that single-thread process, and it does this by
running itself on the second CPU. IOW, if you have only 1 process
running, that process will occupy 1 CPU, and the OS makes use of the
other for its own tasks: job scheduling, disk scheduling, handling
user inputs (interrupts), etc.
warr> it is definitely slower than the single cpu
................^^^^^^^^^^
warr> without interprocessor communication.
"definite" is the most wrong word here.
Interprocess communication? When 2 completely separate processes are
running on the 2 CPUs, why is there a need to do any interprocessor
communication? This interprocessor communication may be big for
multi-threaded processes, as they share memory space, and hence may
trigger cache-coherence, which incurrs overhead. However, when the 2
CPUs are concentrating on separate physical addresses, how come they
need to inter-communication?
warr> I didn't see any benchmarks on Linux.
But user experience is very consistent: the system appears more
responsive. This is no unreasonable. Even when running just a single
CPU-intensive process, there is still the other CPU ready to respond
to mouse clicks, keypresses, etc.
warr> but in windows, there are lots of benchmarks that shows
warr> faster execution on a single CPU than a dual cpu if you use
warr> a program that isn't multi threaded.
That only shows that Windows suck. Hardly are these benchmarks any
proof that dual systems cannot work efficiently under Linux. Windows
is very insecure, too. Would you then generalize this and say that
all computer systems (not just PCs) are insecure?
warr> OS is Dual CPU complient doesn't optimize your single
warr> threaded process.
It depends on how that OS is implemented. A stupid implementation
won't help, of course! A smart one does. That's the same as computer
programs. Stupid people would use O(2^n) algorithms for a task where
every smart people would implement O(n) algorithms. That doesn't mean
the task is difficult, just the programmer is stupid.
--
Lee Sau Dan ���u��(Big5) ~{@nJX6X~}(HZ)
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee
Technical Details
Message-ID:
<m34r8ihv25.fsf@mika.informatik.uni-freiburg.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!newsfeed.stueberl.de!feed.news.nacamar.de!news.belwue.de!news.uni-freiburg.de!not-for-mailReferences:
<pan.2003.01.03.13.58.10.249319@iprimus.com.au> <av578p$c8s17$1@ID-99293.news.dfncis.de> <av5qtf$tcf$1@lust.ihug.co.nz> <fbf82913.0301040421.1a35bdfa@posting.google.com> <3E178C63.7040901@netscape.net> <3E1797D0.4050907@netscape.net> <fbf82913.0301052133.36e2aee9@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 114381,acfea8e5e9ff6f15 X-Google-Attributes: gid114381,public X-Google-Thread: 102b32,acfea8e5e9ff6f15 X-Google-Attributes: gid102b32,public X-Google-Thread: 102983,acfea8e5e9ff6f15 X-Google-Attributes: gid102983,public X-Google-ArrivalTime: 2003-01-10 01:45:02 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!newsfeed.stueberl.de!feed.news.nacamar.de!news.belwue.de!news.uni-freiburg.de!not-for-mail From: Lee Sau Dan <danlee@informatik.uni-freiburg.de> Newsgroups: aus.computers.linux,comp.os.linux.hardware,aus.ads.forsale.computers.used Subject: Re: Dual processors ? Date: 10 Jan 2003 09:09:41 +0100 Organization: Rechenzentrum der Universitaet Freiburg, Germany Lines: 71 Message-ID: <m34r8ihv25.fsf@mika.informatik.uni-freiburg.de> References: <pan.2003.01.03.13.58.10.249319@iprimus.com.au> <av578p$c8s17$1@ID-99293.news.dfncis.de> <av5qtf$tcf$1@lust.ihug.co.nz> <fbf82913.0301040421.1a35bdfa@posting.google.com> <3E178C63.7040901@netscape.net> <3E1797D0.4050907@netscape.net> <fbf82913.0301052133.36e2aee9@posting.google.com> NNTP-Posting-Host: camaro.informatik.uni-freiburg.de Mime-Version: 1.0 Content-Type: text/plain; charset=cn-big5 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7