LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-16-2012, 11:19 AM   #1
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Rep: Reputation: Disabled
Post Why can't more processors use more RAM?


Let's say I have a 32bit computer with 2 Physical (Not-Logical) CPUs. Why can't each processor acsess 4 gigs of RAM? (Total of 8) Why does it top out at 4gigs not depending how many processors there are? Doesnt each prossesor have a ESP register (that is the one that handles ram right?)?
 
Old 01-16-2012, 11:29 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I don't think anything has a logical cpu - they are called cores.

Think about it . . .
 
Old 01-16-2012, 11:38 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Zssfssz View Post
Let's say I have a 32bit computer with 2 Physical (Not-Logical) CPUs. Why can't each processor acsess 4 gigs of RAM? (Total of 8) Why does it top out at 4gigs not depending how many processors there are? Doesnt each prossesor have a ESP register (that is the one that handles ram right?)?
If the motherboard supports more than 4GB of ram then even one 32 bit processor can use more than 4GB of ram. You just need a PAE build of the Linux kernel.

In almost all x86 multiprocessor designs, all processors share the same physical address for ram, so there is no reason for more processors to be either necessary or sufficient for accessing more ram.

The ESP register is the 32 bit stack pointer. I have no idea what you think you mean by "the one that handles ram". But whatever that means, you are confused.

In a 32 bit "flat" memory architecture (such as that used by both Linux and Windows in 32 bit x86) every address is mapped from a 4GB virtual address space into whatever size physical address space is supported by that system, which might be up to 64GB.
Each process has a different mapping, so multiple processes can use more than 4GB of physical memory.

The translation layer skips the low 12 bits of the virtual/physical address, so there is not even any inconvenience of using 32 bit registers for setting up the PAE mapping data. The PAE version of mapping maps the 20 high bits of a 32 bit virtual address to the 24 high bits of a 36 bit physical address. In a properly modularized OS, only a tiny part of the kernel needs to be aware of the physical address size. Windows is not well modularized, so many drivers need to be aware of the physical address size and only support 4GB, so the ordinary version of 32 bit XP supported only 3 and a fraction GB of ram even when PAE was turned on. 32 bit windows support for 4GB or more of ram was restricted by a special license and restricted in which devices had working drivers.

Last edited by johnsfine; 01-16-2012 at 11:51 AM.
 
Old 01-16-2012, 11:39 AM   #4
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
Intel had/has this 'Hyper Threading Technology' introduced sometime in the late pentiums. It allowed a single CPU to act as two logical CPUs, I think they have improved on it to increase the number of logical CPUs.
Oh you where talking about the word... Windows, Wikipedia, Intel, they all called it logical CPUs.
Back to the question.
 
Old 01-16-2012, 11:55 AM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,973

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
If you have a 32 bit dual processor, then it is pretty old. The motherboard chipset most likely is the issue but in any case you have to have pae and a supported smp version that would allow that.

Not sure I have known how to implement pae in smp.
 
Old 01-16-2012, 12:31 PM   #6
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Original Poster
Rep: Reputation: Disabled
Ohh, I installed a PAE kernel thinking that ment it was an update, or just a Meta-Package; I had no idea that's what it did!
So what I gather from that is that PAE can address more RAM. If that's the case then why don't distros like Ubuntu use the PAE version as their default?
 
Old 01-16-2012, 01:12 PM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Zssfssz View Post
If that's the case then why don't distros like Ubuntu use the PAE version as their default?
I think most people with 4GB or more ram on a Linux system use or should use a 64 bit version of Linux.

There are various tiny overheads to each of PAE and 64-bit compared to non-PAE 32-bit (extra time on each TLB miss, extra kernel code size, extra memory mapping table size). Those normally don't add up to enough for anyone to worry about, but if you have a 32 bit system with too little ram to need PAE, why should a distribution default to including even tiny overhead that you don't need.

If you have a slightly older 32 bit CPU the performance differences of TLB misses will be a larger fraction of total performance. If you have a much older 32 bit CPU, a PAE kernel won't work at all.

If you have extremely little ram, the small difference in kernel code size and memory table size may matter.

Most distributions default to including SMP support in every kernel, even though many users have single thread hardware. That also adds some tiny overhead in kernel code size and performance. But at least the SMP kernel doesn't fail on a system with no hardware support for SMP the way a PAE kernel fails on a system with too old a 32 bit CPU.

The distribution needs to make their best estimate of what will be acceptable for a lot of users: SMP whether you need it or not, PAE typically only is you install the PAE package to replace the default kernel, other kernel build options no pre built choice at all.
If you want a kernel exactly to your specifications, Linux is open source so you can compile your own.

Last edited by johnsfine; 01-16-2012 at 01:18 PM.
 
Old 01-16-2012, 03:25 PM   #8
jthill
Member
 
Registered: Mar 2010
Distribution: Arch
Posts: 211

Rep: Reputation: 67
Let me give an answer I haven't seen yet to the initial question: the two cpus must share access to the same memory because if they did not, they would not be able to copy directly from one to another (because neither could access the other's), and so would have to effectively communicate across a network link, and you'd have a distributed-system-in-a-box not a dual-cpu system. Other issues come into play as well, if you want a taste there's the WP article on single-image systems.
 
  


Reply

Tags
cpu


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
Finding out what RAM chip needed to upgrade from 2GB to 4GB RAM. farmerluk Linux - Hardware 4 11-17-2011 12:02 PM
Why size of swap space is 2x of RAM??? Why not 1.5x of RAM or 2.5x of RAM??? Saurav Ghosh Linux - Newbie 7 11-01-2011 03:49 AM
Doubt about physcial processors and logical processors umeshgupta1987 Solaris / OpenSolaris 5 08-10-2011 03:17 PM
Red Hat ISO file download needed for 128 ram ,200 mmxpentium processors sylvaincyr Red Hat 5 03-18-2010 11:49 AM
Will Linux Support Amd Processors And Other Than Intel Processors? halovivek Linux - Hardware 6 09-02-2003 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:04 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration