Avatar of SoLost
SoLost
Flag for New Zealand asked on

Why can a 32bit operating system only see 4GB RAM but can see 2TB hard drives?

Hi there,
This is for my own knowledge more than anything else but lots of failed Google searches haven't found me the answer and it's niggling at me.

I understand the reason why a 32bit operating system can only see up to 4GB of RAM as 4GB is the maximum addressing range for a 32 bit number ( 2^32 = 4GB ).

But with that in mind, how come a 32bit operating system is able to see a much larger hard drive? Up to 2TB if I recall.

How have they overcome this particular limitation for hard drives but not for RAM?
Storage HardwareStorageOperating Systems

Avatar of undefined
Last Comment
nobus

8/22/2022 - Mon
nobus

that is because it uses LBA - block adressing :
https://en.wikipedia.org/wiki/Logical_block_addressing
SOLUTION
Dave Baldwin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Gary Case

Technically the premise of your question is wrong.   32-bit operating systems can see far more than 4GB, but can only directly address 4GB.    To USE more than 4GB requires some form of address extension, whereby the memory is addressed in pages, which can be mapped in and out of the 4GB address space the CPU can physically address.    Microsoft does this using PAE (physical address extension), which allows a 32-bit CPU to address up to 128GB of memory.

However, they only implemented this on server versions of Windows, and how much can actually be addressed is a function of the specific version of the OS.   For example, Server 2008 can address 64GB with the 32-bit version.

By the way, 32-bit versions of Windows from Vista on can see disks far larger than 2TB, as they all support GPT disks -- so you can use modern 6TB, 8TB, 10TB, and even larger disks.
gheist

64GB to be accurate (4 bits in PAT for address selector)
Single 32bit process is limited to 4GB address space, on a 32bit system it uses same address space for system calls, on 64bit system it can use all 4GB for itself.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Gary Case

Microsoft's implementation does indeed restrict the max total to 64GB ... although there was a version fo Server 2003 DataCenter Edition that supported 128GB with 32-bit CPU's.   But they've since restricted their 32-bit servers to a max of 64GB because of the easier implementation.
gheist

Gary Case

From Mark Russinovich's blog on "Pushing the Limits of Windows: Physical Memory" ...

"... The maximum 32-bit limit of 128GB, supported by Windows Server 2003 Datacenter Edition,  comes from the fact that ..."

It accomplishes that through a PFN database that is used by the memory manager to track the pages and map them into a virtual space.   Microsoft did not choose to continue this scheme in subsequent server versions, since they could get better performance with the 4-bit PAT, which limits the addressing to 64GB, but it IS possible to support more.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
gheist

There is no such OS ever released.
PAE and PSE both go to 64GB ditto.
Dave Baldwin

Regardless... the basic answer to the original question is that RAM is addressed in bytes while disk space is accessed in 512-byte blocks.  There can be a lot more details but that's the basic answer.
gheist

There are simple algorithms to do double-width math (or quad)
There should be no problem supporting exabytes on a 32bit system.
There is some practical limits though like how much address space is needed by practical on-disk structures in each case etc.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Gary Case

"... There is no such OS ever released. " ==>  I presume you know who Mark Russinovich is ... founder of WinInternals;  Microsoft Technical Fellow (after they bought his company); and one of the most respected experts in Windows technologies.   The quote above is from his blog here:

https://blogs.technet.microsoft.com/markrussinovich/2008/07/21/pushing-the-limits-of-windows-physical-memory/
gheist

Excel still makes blatant rounding errors...
If you read coments you see a lots of sceptics (especially show that 32bit system with 128GB support)
SoLost

ASKER
Thanks everyone for helping me to understand.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
nobus

i was the first to post the solution - and nothing??
SoLost

ASKER
Apologies.  I thought I had tagged the top 3... I don't seem to be able to modify my answer.
nobus

you can if you want to - by using request attention
but tx anyway
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy