On Sat, 2 Jun 2007 19:25:26 +0100, "Haydon" <me@privacy.net> wrote:
>If you have 4GB of RAM, it will only show as having 3GB of RAM in Vista,
>because 1GB is used for hardware.
Not exactly. Note four things:
1.It's not all versions of Vista, it's only 32-bit Vista. This is not
an issue in 64-bit Vista.
2. It's not just Vista. It's *all* 32-bit versions of Windows.
3. It's not 3GB, it's *around* 3GB--usually a little more than 3GB
4. It's not that the RAM is used for hardware, it's that that portion
of the *address space* is used for hardware. The leftover GB or so of
RAM just gets no address space to map it to.
>Does Vista allocating 1GB of RAM to hardware improve system performance?
See number 4 above. No, because it doesn't allocate any of that system
RAM to hardware.
--
Ken Blake, Microsoft MVP Windows - Shell/User
Please Reply to the Newsgroup
OK, so getting the hair splitting out of the way. Based on 32bit Vista, and
it is not necessarily 3GB of RAM used by the OS, it could be give or take.
So, basically PC manufactures are ripping people off by selling them 4GB of
RAM, when 3GB would have the same performance?
"Ken Blake, MVP" <kblake@this.is.am.invalid.domain> wrote in message
news:39f3631k176udc3qcg4bcola8viaa52q4h@4ax.com...
> On Sat, 2 Jun 2007 19:25:26 +0100, "Haydon" <me@privacy.net> wrote:
>
>
> 4. It's not that the RAM is used for hardware, it's that that portion
> of the *address space* is used for hardware. The leftover GB or so of
> RAM just gets no address space to map it to.
>
> OK, so getting the hair splitting out of the way. Based on 32bit Vista,
> and it is not necessarily 3GB of RAM used by the OS, it could be give or
> take.
>
> So, basically PC manufactures are ripping people off by selling them 4GB
> of RAM, when 3GB would have the same performance?
Ok this is how it works, I am going to attempt to explain it as best as I
can...
This applies to pretty much any operating system, be it Linux, Windows, Mac,
WinCE and other embedded systems with processors that have a MMU.
A 32-bit processor can address 32-bits of address space, so in other words,
4 gigabytes. In any multi tasking operating system, address space is split
into two parts. One is called User space and it generally starts at address
0. The other part is called Kernel space and starts at whatever arbitrary
address the kernel chooses for it. In case of WinXP for example, this is
the 2 gigabyte, or if enabled via a special boot switch, the 3 gigabyte
mark.
Now user-space is reserved for applications. Each single application gets
its own copy of user space. So if there are 10 running processes, there are
10 user space mappings all starting at address 0. As the task manager
switches between the processes, it sets up the correct mapping starting
from address 0 for the process it is going to run next. Rinse and repeat
for every process in the list and then start over.
So this is what enables every application to have it's own memory and
without stepping on the memory of another application. The task manager has
a list of memory pages, usually 4kb in size each and it has a list for each
process which of these pages are assigned to it. So basically, if you have
2 gigs of memory then there are about 524288 4kb pages that can be assigned
to the various applications. Once you run out of those pages, the system
runs out of memory. These pages are assigned to each process in a
contiguous manner starting from address 0 to however much memory an
application needs to the end of user addressable space.
So on WinXP, since it has a 2 gig user space, it is impossible for any one
application to use more than 2 gigs of space even if a system had 4 gigs as
it can only address 2 gigs.
Now the second part, Kernel space cannot be used by an application. The
various hardware in your system also needs room in the 4 gigs worth of
address space. For example, the video memory of your video card is mapped
into kernel space. So taking XP as an example, if you have 512 megs of
memory, then XP assigns 512 megs of address space, of it's 2 gig kernel
addressable space, to the video card. This then leaves 1.5 gigs available
for other hardware, the kernel's own memory, etc.
Now all this is done by a Memory Management Unit on the CPU that uses a
pagetable directory to figure out what page goes where. It's a really neat
thing that can map any 4kb page from *anywhere* in memory *to* anywhere in
memory. This is the most basic thing that even allows multi tasking. It
however can only map up to 4 gigs of space since the CPU only has 32-bit
registers.
Now since hardware also has to be mapped into the same address space as
memory, any address space used up by your various installed hardware for
addressing, such as video memory, can no longer be used for anything else
in the pagetable.
So that means that if you have 4 gigs of ram, any amount of addressable
space mapped to hardware and the kernel cannot be mapped to anything else
anymore. That is why you see less than 4 gigs available.
64-bit CPUs don't have this problem because instead of 4 gigs of addressable
space, they have 17,179,869,184 gigs of addressable space.
I don't think even MS can manage to fill up that many gigs of space anytime
soon.
Haydon wrote:
> OK, so getting the hair splitting out of the way. Based on 32bit Vista,
> and it is not necessarily 3GB of RAM used by the OS, it could be give or
> take.
>
> So, basically PC manufactures are ripping people off by selling them 4GB
> of RAM, when 3GB would have the same performance?
Basically, correct.
Let me try to explain this.
All a computer program can do (the instructions avaliable to it) is to
read and write to memory, and to perform arithmetic. But programs
display items on your screen, read and write files on your hard disk,
talk to the network card, etc.
In order to (for example) write some data to the hard disk, what it does
is to write to an area of memory that doesn't need to physically exist.
Then the hard disk controller intercepts that and writes to the disk.
When you add 4GB of memory to a computer, all of the address space
actually has physical memory backing it up. So where do you write to if
you want to talk to the hard disk, for example?
The answer is that you have to 'waste' physical memory.
On Sat, 2 Jun 2007 20:19:36 +0100, "Haydon" <me@privacy.net> wrote:
>OK, so getting the hair splitting out of the way. Based on 32bit Vista, and
>it is not necessarily 3GB of RAM used by the OS, it could be give or take.
You can call it hair-splitting if you want, but I don't think it's
that at all.
>So, basically PC manufactures are ripping people off by selling them 4GB of
>RAM, when 3GB would have the same performance?
That's true, *if* the RAM is sold with a 32-bit operating system.
>"Ken Blake, MVP" <kblake@this.is.am.invalid.domain> wrote in message
>news:39f3631k176udc3qcg4bcola8viaa52q4h@4ax.com.. .
>> On Sat, 2 Jun 2007 19:25:26 +0100, "Haydon" <me@privacy.net> wrote:
>>
>>
>> 4. It's not that the RAM is used for hardware, it's that that portion
>> of the *address space* is used for hardware. The leftover GB or so of
>> RAM just gets no address space to map it to.
>>
--
Ken Blake, Microsoft MVP Windows - Shell/User
Please Reply to the Newsgroup
> On Sat, 2 Jun 2007 11:49:00 -0700, "Justin" <None@None.com> wrote:
>
>>"Haydon" <me@privacy.net> wrote in message
>>news:G4OdndgUGqOpK_zbRVnytwA@pipex.net...
>>> If you have 4GB of RAM, it will only show as having 3GB of RAM in Vista,
>>
>>This is normal for the 32bit version of Vista.
>>
>>> because 1GB is used for hardware.
>>
>>Who told you that? Stop listening to them. That is not true.
>
> Yea right, listen to the newsgroup crybaby and clown instead (Justin)
> that admits he gets a kick out of trying to upset people and doesn't
> consider some posters human who's only purpose here is to see how many
> fights he can start.
>
> Want Justin to get po-ed? Simply disagree with anything he says ever
> so slightly and he'll promptly label you a liar and troll.
Honestly that's not true. I disagree with Justin on plenty of things but he
doesn't label me a liar or troll.
But then again I also have a habit of bringing along realistic arguments and
reasons....that *might* have something to do with it.
"Stephan Rose" <kermos@nospam.somrek.net> wrote in message
news:k8ydnc6Ze8OWUfzbnZ2dnUVZ8qaqnZ2d@giganews.com ...
>
> Ok this is how it works, I am going to attempt to explain it as best as I
> can...
>
> This applies to pretty much any operating system, be it Linux, Windows,
> Mac,
> WinCE and other embedded systems with processors that have a MMU.
>
> A 32-bit processor can address 32-bits of address space, so in other
> words,
> 4 gigabytes. In any multi tasking operating system, address space is split
> into two parts. One is called User space and it generally starts at
> address
> 0. The other part is called Kernel space and starts at whatever arbitrary
> address the kernel chooses for it. In case of WinXP for example, this is
> the 2 gigabyte, or if enabled via a special boot switch, the 3 gigabyte
> mark.
>
> Now user-space is reserved for applications. Each single application gets
> its own copy of user space. So if there are 10 running processes, there
> are
> 10 user space mappings all starting at address 0. As the task manager
> switches between the processes, it sets up the correct mapping starting
> from address 0 for the process it is going to run next. Rinse and repeat
> for every process in the list and then start over.
>
> So this is what enables every application to have it's own memory and
> without stepping on the memory of another application. The task manager
> has
> a list of memory pages, usually 4kb in size each and it has a list for
> each
> process which of these pages are assigned to it. So basically, if you have
> 2 gigs of memory then there are about 524288 4kb pages that can be
> assigned
> to the various applications. Once you run out of those pages, the system
> runs out of memory. These pages are assigned to each process in a
> contiguous manner starting from address 0 to however much memory an
> application needs to the end of user addressable space.
>
> So on WinXP, since it has a 2 gig user space, it is impossible for any one
> application to use more than 2 gigs of space even if a system had 4 gigs
> as
> it can only address 2 gigs.
>
> Now the second part, Kernel space cannot be used by an application. The
> various hardware in your system also needs room in the 4 gigs worth of
> address space. For example, the video memory of your video card is mapped
> into kernel space. So taking XP as an example, if you have 512 megs of
> memory, then XP assigns 512 megs of address space, of it's 2 gig kernel
> addressable space, to the video card. This then leaves 1.5 gigs available
> for other hardware, the kernel's own memory, etc.
>
> Now all this is done by a Memory Management Unit on the CPU that uses a
> pagetable directory to figure out what page goes where. It's a really neat
> thing that can map any 4kb page from *anywhere* in memory *to* anywhere in
> memory. This is the most basic thing that even allows multi tasking. It
> however can only map up to 4 gigs of space since the CPU only has 32-bit
> registers.
>
> Now since hardware also has to be mapped into the same address space as
> memory, any address space used up by your various installed hardware for
> addressing, such as video memory, can no longer be used for anything else
> in the pagetable.
>
> So that means that if you have 4 gigs of ram, any amount of addressable
> space mapped to hardware and the kernel cannot be mapped to anything else
> anymore. That is why you see less than 4 gigs available.
>
> 64-bit CPUs don't have this problem because instead of 4 gigs of
> addressable
> space, they have 17,179,869,184 gigs of addressable space.
>
> I don't think even MS can manage to fill up that many gigs of space
> anytime
> soon.
>
> --
> Stephan
> 2003 Yamaha R6
>
> 君のこと思い出す日なんてないのは
> 君のこと忘れたときがないから
Nice explanation
--
Jane, not plain 64 bit enabled :-)
Batteries not included. Braincell on vacation ;-)
MVP Windows Shell/User
Impressive response....I never knew the full explanation before....Thanks !
"Stephan Rose" <kermos@nospam.somrek.net> wrote in message
news:k8ydnc6Ze8OWUfzbnZ2dnUVZ8qaqnZ2d@giganews.com ...
> Haydon wrote:
>
>> OK, so getting the hair splitting out of the way. Based on 32bit Vista,
>> and it is not necessarily 3GB of RAM used by the OS, it could be give or
>> take.
>>
>> So, basically PC manufactures are ripping people off by selling them 4GB
>> of RAM, when 3GB would have the same performance?
>
> Ok this is how it works, I am going to attempt to explain it as best as I
> can...
>
> This applies to pretty much any operating system, be it Linux, Windows,
> Mac,
> WinCE and other embedded systems with processors that have a MMU.
>
> A 32-bit processor can address 32-bits of address space, so in other
> words,
> 4 gigabytes. In any multi tasking operating system, address space is split
> into two parts. One is called User space and it generally starts at
> address
> 0. The other part is called Kernel space and starts at whatever arbitrary
> address the kernel chooses for it. In case of WinXP for example, this is
> the 2 gigabyte, or if enabled via a special boot switch, the 3 gigabyte
> mark.
>
> Now user-space is reserved for applications. Each single application gets
> its own copy of user space. So if there are 10 running processes, there
> are
> 10 user space mappings all starting at address 0. As the task manager
> switches between the processes, it sets up the correct mapping starting
> from address 0 for the process it is going to run next. Rinse and repeat
> for every process in the list and then start over.
>
> So this is what enables every application to have it's own memory and
> without stepping on the memory of another application. The task manager
> has
> a list of memory pages, usually 4kb in size each and it has a list for
> each
> process which of these pages are assigned to it. So basically, if you have
> 2 gigs of memory then there are about 524288 4kb pages that can be
> assigned
> to the various applications. Once you run out of those pages, the system
> runs out of memory. These pages are assigned to each process in a
> contiguous manner starting from address 0 to however much memory an
> application needs to the end of user addressable space.
>
> So on WinXP, since it has a 2 gig user space, it is impossible for any one
> application to use more than 2 gigs of space even if a system had 4 gigs
> as
> it can only address 2 gigs.
>
> Now the second part, Kernel space cannot be used by an application. The
> various hardware in your system also needs room in the 4 gigs worth of
> address space. For example, the video memory of your video card is mapped
> into kernel space. So taking XP as an example, if you have 512 megs of
> memory, then XP assigns 512 megs of address space, of it's 2 gig kernel
> addressable space, to the video card. This then leaves 1.5 gigs available
> for other hardware, the kernel's own memory, etc.
>
> Now all this is done by a Memory Management Unit on the CPU that uses a
> pagetable directory to figure out what page goes where. It's a really neat
> thing that can map any 4kb page from *anywhere* in memory *to* anywhere in
> memory. This is the most basic thing that even allows multi tasking. It
> however can only map up to 4 gigs of space since the CPU only has 32-bit
> registers.
>
> Now since hardware also has to be mapped into the same address space as
> memory, any address space used up by your various installed hardware for
> addressing, such as video memory, can no longer be used for anything else
> in the pagetable.
>
> So that means that if you have 4 gigs of ram, any amount of addressable
> space mapped to hardware and the kernel cannot be mapped to anything else
> anymore. That is why you see less than 4 gigs available.
>
> 64-bit CPUs don't have this problem because instead of 4 gigs of
> addressable
> space, they have 17,179,869,184 gigs of addressable space.
>
> I don't think even MS can manage to fill up that many gigs of space
> anytime
> soon.
>
> --
> Stephan
> 2003 Yamaha R6
>
> 君のこと思い出す日なんてないのは
> 君のこと忘れたときがないから
Dnia Sat, 02 Jun 2007 21:59:05 +0200, Stephan Rose napisa(a):
[cut]
Nice explanation. Thanks!
> 64-bit CPUs don't have this problem because instead of 4 gigs of addressable
> space, they have 17,179,869,184 gigs of addressable space.
> I don't think even MS can manage to fill up that many gigs of space anytime
> soon.
Oh man, it's good that you added _soon_ becasue there was a guy who said
some (not a long) time ago that "640KB ought to be enough to anybody" ...
Now we live in word of GIGAbytes of memory ... MEGAbytes times went away...
My first computer Atari 65XE had 64KB(?) of memory (1988), Amiga 600 had
1MB (1992), then 486DX4 had 8MB RAM (around 1995), recent laptop 1GB and
I'm going to upgrade to 2GB (and we have 2007).
2GB / 64KB = 32768 times memory has grown up in ~20 years...
So .... homework for anyone.... let's estimate when we fill up above amount
of memory ... or rather our grand...grand..grand...children