LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-28-2011, 12:20 AM   #1
tarunchawla
Member
 
Registered: Mar 2010
Location: New Delhi,India
Distribution: Ubuntu 14.04
Posts: 117

Rep: Reputation: 3
what do you mean by 16,32or 64 bit OS


I want to know what is 32 bit OS and how it effects the size of RAM and Hardisk it can access, how 32 bit OS can address upto 4 gb of RAM.
There are also servers who can address 48 Gb of RAM ,please explain me all these things.
 
Old 11-28-2011, 12:29 AM   #2
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Rep: Reputation: 38
This article may be of benefit to you:

http://lifehacker.com/5431284/the-li...rating-systems
 
1 members found this post helpful.
Old 11-28-2011, 05:03 AM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
the article that basica links, is reasonable enough, as an overview of the situation, but a bit Windows-focussed, although this comment in particular now seems questionable:

Quote:
...and if you're running Linux, you probably know this stuff already.
Quote:
size of RAM
Sort-of explained in the article (doesn't really explain PAE, but does vaguely mention that it exists). I am sure, if you want to, you can find other articles which explain this kind of subject without the Windows emphasis, but you'd have to use a search engine.

Quote:
...Hardisk...
Unaffected

Quote:
how 32 bit OS can address upto 4 gb of RAM
By using an address for each (potential) location.

Quote:
There are also servers who can address 48 Gb of RAM
There are indeed; in fact, there are servers that can access more. In the same way that a pure 32 bit OS can address memory, other OSs can use addresses to access memory (actually, it is to distinguish one memory location from all of the others). This should not be a surprise.
 
Old 11-28-2011, 08:21 AM   #4
magiknight
Member
 
Registered: Oct 2003
Posts: 37

Rep: Reputation: 4
Quote:
Originally Posted by salasi View Post
the article that basica links, is reasonable enough, as an overview of the situation, but a bit Windows-focussed, although this comment in particular now seems questionable:





Sort-of explained in the article (doesn't really explain PAE, but does vaguely mention that it exists). I am sure, if you want to, you can find other articles which explain this kind of subject without the Windows emphasis, but you'd have to use a search engine.



Unaffected



By using an address for each (potential) location.



There are indeed; in fact, there are servers that can access more. In the same way that a pure 32 bit OS can address memory, other OSs can use addresses to access memory (actually, it is to distinguish one memory location from all of the others). This should not be a surprise.
I will add to this,
16bit OS (realmode style) can only access 64k of memory at a time.
32bit OS (protected mode) can access 4GB now this is true for 32bit addressing only, using PAE which is a hack we can access 4GB per application (36bit address mask to allow up to 64 GB total)
64 bit OS also runs in protected mode but uses a 64bit memory mask for a total of 16 Eb (in reality 256 Tb)

None of these have any impact on how much drive space can be used.

Last edited by magiknight; 11-28-2011 at 08:23 AM.
 
Old 11-28-2011, 09:21 AM   #5
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 tarunchawla View Post
I want to know what is 32 bit OS and how it effects the size of RAM and Hardisk it can access, how 32 bit OS can address upto 4 gb of RAM.
There are also servers who can address 48 Gb of RAM ,please explain me all these things.
In x86, a 16bit OS might be either:
* Real mode (like DOS) in which all addresses had two 16 bit parts that were combined overlapped to form a 20 bit physical address, so up to 1MB of address space was available, but due to design decisions by IBM (that were widely and incorrectly attributed to Bill Gates) only 640KB of ram could be addressed withing the 1MB address space.
* Protected mode (such as 16bit Windows) in which addresses had two 16 bit parts that were combined in a more complicated way providing more physical address range and protection between processes.

32bit X86 OS's might be "flat" or "segmented", but all the important ones are "flat". Both the kernel and user space in a flat OS are mapped through a paging table, so every address directly used in a program is virtual and is translated to a physical address (by TLB's backed by a page table structure). The virtual addresses are 32 bit across the whole architecture. So a 4GB virtual address space is a fundamental aspect of the architecture. But the mapping hardware evolved over the lifetime of the architecture from an initial 24 bit physical up to a final 36 bit physical.

Only a tiny part of the OS is involved in managing the page tables and needs to be aware of the size of a physical address. The rest of the OS and user mode code works with 32 bit virtual addresses. When the hardware has over 4GB (up to 64GB) ram, the fixed mapped portion of the kernel (which is almost all of it in ordinary Linux) plus any one process can't add up to more than 4GB. But counting other processes and file caching etc., the system can make good use of much more than 4GB.

But for 48GB, you need a different design of kernel, which was an important option in RHEL4, but is largely gone from Linux now. In that design, most of the kernel is normally unmapped, so the kernel is effectively in its own 4GB virtual space rather than limited to a quarter (typically) of each process's virtual space. Most of the 48GB of ram is normally unmapped at any given moment, but the kernel at least has enough address space to map all the data structures it uses to keep track of all the pages of physical ram.

In a 64 bit OS, virtual addresses are 48 bits that must be represented by 64bit pointers. The pointer consists of 17 identical copies of a bit that tells whether it is a user mode or kernel mode address, followed by 47 bits that give the offset within that space.

As in 32 bit OS's, all virtual addresses are translated into physical by TLBs backed by a page table structure. The number of physical address bits is again a detail varying by specific model of CPU chip and only a small part of the OS needs to worry about that detail.

32 bit X86 has three different page table designs, two of which (original and PAE) are in common use.
Original translates a 32 bit virtual address into up to 32 bits of physical address.
PAE translates a 32 bit virtual address into up to 36 bits of physical address.

64 bit X86, so far, has only one page table design (which is very similar to 32 bit PAE), which translates a 48 bit virtual address into a physical address of up to 40 bits (but specific chip models might support fewer than 40 bits). 64 bit X86 was designed to allow evolution to more physical and virtual address bits in future chip versions without needing any code change to user mode code nor to most kernel mode code.
Up to 11 bits could be added to physical addresses with only a tiny change in page table structure. Virtual addresses could be changed from 48 bit to 57 bit with a bigger change to page tables, or all the way to 64 bit with an even bigger change. A fundamental change in page table structure would be needed for over 51 bits physical, but even that would still need changes only in the page table management section of the OS, not in any user mode code.

Last edited by johnsfine; 11-28-2011 at 10:17 AM.
 
1 members found this post helpful.
Old 11-28-2011, 10:47 AM   #6
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 basica View Post
This article may be of benefit to you:
That has pretty severe errors:

Quote:
PAE ... requires special application support that most applications don't have
Total nonsense. PAE is transparent to applications. They have no reason to be aware PAE even exists. Given sane modularization between the kernel and device drivers, only a tiny portion of the kernel needs to be aware of PAE.

With incompetent OS design and lacking sane modularization between kernel and device driver, PAE (actually support for over 4GB physical addressing) becomes a mess for every device driver. So many 32 bit Windows device drivers don't work in systems with over 4GB physical, so even with PAE most Windows systems don't support over 4GB physical addressing. Only server versions of 32 bit Windows with restricted driver support allow over 4GB physical. But even in Windows there is no PAE impact on applications.

Quote:
A common misconception is that this is a Windows-specific problem, when in fact 32-bit Linux and Mac OS X have the same limitations
Linux has better modularity between kernel and driver so almost every 32 bit driver works in a PAE system with either zero code change or very little. Some of the motivation for the 4GB limit on home Windows was also license issues rather than driver issues. Linux doesn't have those issues. Other reasons for the 4GB limit involve closed source third party drivers, which are a much smaller problem in Linux than in Windows (making a display driver PAE compatible in Windows is a mess, so vendors weren't motivated to support that in every driver. making a display driver PAE compatible in Linux is trivial).

Last edited by johnsfine; 11-28-2011 at 10:53 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
64 bit cpu-64 bit Ubuntu-are there 32 bit app issues? sofasurfer Ubuntu 7 04-09-2014 02:02 PM
[SOLVED] Installing 32 bit RPMs on 64 bit Linux conflicts with 64 bit packages gheibia Linux - Server 1 08-18-2011 01:33 AM
64 bit or 32 bit Ubuntu 10.04 in a multiple boot with windows 64 and 32 bit ? james2b Linux - General 7 09-22-2010 04:12 PM
LXer: Ubuntu 32-bit, 32-bit PAE, 64-bit Benchmarks LXer Syndicated Linux News 0 12-30-2009 11:00 AM
32 bit or 64 bit install - is 32 bit easier for a newbie? dms05 Linux - Newbie 3 05-19-2006 03:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:07 PM.

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