LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-13-2006, 05:28 PM   #1
wini_g
Member
 
Registered: Jun 2003
Distribution: SuSE 11.0
Posts: 171

Rep: Reputation: 30
General capability of Linux kernel & Graphical environments to exploit multi core ?


Hi - a few general questions regarding multi core / multi processor & how prepared Linux & the GUI are .

I read this article : http://www.itmanagersjournal.com/feature/21167 "Boosting application performance with multi-core processing"

- but still have questions


When running Windows TaskManager it shows a thread count of 300/400 or so .

As far as I get it threads are processes within processes kindof .

I read somewhere else that Windows is very capable of exploiting multicore because of this high thread count which can then be spread across cores .


From what Ive seen in Linux in various system monitors there are 50 to 100 processes on a desktop system with a handful of threads - making the combined ratio between Linux & Windows thread & processes - something like 10 to 1 .

I seen many articles about threads on Linux but have yet so see many on my system - - ?


Regarding the above - how good or maybe even how do the kernel & GUIs like the Xserver with e.g. KDE exploit the added processing power available in multicore ?


Don't severe performance scaling problems arise when multicore have something like 4 cores or then 8 .. 16 .. ?

AFAIK only few programs are specially programmed with this kind of soon HPC processor(core) amount in mind - especially not GUIs Id guess .


Thankyou very much for any replies - BTW from my post I guess you can guess - I am not a programmer - but cool prog "internal" info is still very appreciated -

 
Old 11-13-2006, 06:33 PM   #2
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
in my opinion this whole idea is a red heering put forward by chip manufacturers.
desktop programming is already quite multi threaded but the fact remains that human interaction with a desktop system remains linear. So the value of multi-core cpu for a desktop system will remain forever questionable. unless of course you are going to hook up 8 extra keyboards at once and type eight letters at once with your 14 new arms and hands.

so the manufacturers have created this "software not threaded or ready" idea to explain away the simple fact that the chips are basically pointless on desktop machines.
 
Old 11-13-2006, 07:54 PM   #3
petersum
Member
 
Registered: May 2006
Location: Karachi, Pakistan
Posts: 140

Rep: Reputation: 15
Having used dual processor machines of the Xeon variety, I quite agree with "studioj". There is really little advantage for the average user. It is a waste of money.
These dual core machines are only sold as "status symbols" for those who use the computer as a "decoration piece".
 
Old 11-13-2006, 09:47 PM   #4
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
more directly to your question
the Linux kernel handles multi threading very well
the X server is still single threaded and may forever remain so.
it is very very dificult to write a display server that updates the display in any kind of a multi threaded way without a huge train wreck.
so the gui design is multi helper threads but only one thread to write to the screen i think.
 
Old 11-13-2006, 09:48 PM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
It seems from the article that to really take advantage of these multi-core processors, apps need to be written a little differently to how they are now. I don't see how existing windows apps avoid this, since they are no doubt optimised for today's hardware.

My guess is that it will be possible to use better optimisations in the compiler to squeeze out extra performance, although a more radical change to the software structure will be needed to get all the advantages of the new devices. If my guess about compiler optimisation is correct then Linux and open source apps have a very strong advantage - having the source available means it's just a matter of re-building using the new optimisations. Try re-optimising your binary-only software - it'll be a matter of waiting for a release from each vendor. To get your whole server stack optimised under windows you'll need to wait for the OS provider to make a relase, your database vendor to release, your middleware provider to release... I think closed source providers will have a very hard time keeping up with open source projects in this regard.
 
Old 11-14-2006, 09:51 PM   #6
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
what matthewg42 has said is a good point.
to the extent these cpus can do internal paralelism implemented within the chip using machine code created by the compiler specifically for this purpose.
and this IS a part of the architecture of these chips.
gcc usually incorporates these things eventually and you can use them.
if anyone is interested these chips can use large 128 bit instruction words that contain 3 41-bit instructions and a 5-bit template.
load two of those because of dual core and you get 6 instructions per cpu cycle.
scheduling is done by the compiler instead of dynamically. the compiler would insert a test for validity instead of waiting for dependant segments to finish before others can run. There are two Advanced Load Address Tables that keep track of what can only be seen a speculative code execution
and for when inserted tests fail the compiler has to have created aternative fallback code i guess.
 
Old 11-16-2006, 07:12 PM   #7
wini_g
Member
 
Registered: Jun 2003
Distribution: SuSE 11.0
Posts: 171

Original Poster
Rep: Reputation: 30
Thanks to all of you for the replys - especially "studioj"

The recent test of the unoffical 8core Mac on ZDNet of course confirms the experience that many cores dont do many times more work - sometimes even less work .


What I read a while ago on SGI's site was that they have a way of abstracting the massive amount of processors & therefore make it possible for applications designed with e.g. only one processor in mind to still be able to use the whole processing power availlable from the whole system .


Such abstracting must be possible on "normal" machines as well - or not ? - Making CPU use efficient on multicores - ?
 
Old 11-16-2006, 08:12 PM   #8
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
With respect to X being single threaded, and whether more multi-core processors is bad for that... it's hard to tell. it looks at the moment that the trend in windowing systems is for the GPU to be doing more and more work, so CPUs aren't really such a big part of the equation. I don't know where things are going.

If PC architecture goes massively multi-core, I think we're really going to need to see new languages and development stacks to really take advantage of it, unless someone can find the magic formula to make code written in th more traditional ways "just work" across lots of CPUs/cores. If the magic sauce is found, my thinking it will require re-compilation for statically typed languages. VM interpreted / bytecode-compiled softwares may fair better.

This is an old debate Am I the only person who remembers when the transputer was going to turn the Atari Falcon into the new supercomputer on your desktop? It didn't happen because the way software is written just doesn't lend itself splitting up like that, and I don't really see what's changed since then in that respect.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Boot Multi Windows & Multi Linux olkar Linux - Newbie 5 10-03-2005 11:52 AM
[ Fedora Core OpenSSL Exploit ] t3gah Fedora 1 03-27-2005 01:00 AM
Desktop Environments... in general... johnnyICON Linux - General 2 09-30-2004 12:16 PM
Linux kernel exploit in the wild chort Linux - Security 9 12-04-2003 11:18 PM


All times are GMT -5. The time now is 08:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration