The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    MMIO, Vista 32Bit & RAM

    Discussion in 'Windows OS and Software' started by surefire, Jan 24, 2008.

  1. surefire

    surefire Notebook Consultant

    Reputations:
    26
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    30
    co http://support.microsoft.com/kb/929605
    memory-mapped I/O = MMIO = amount of RAM space allocated to each device/component
    *all numbers are approximates*

    Config 1 - Vista 32Bit 4GB RAM

    3.12GB is the amount of RAM available to OS (the remaining 800MB cannot be accessed by OS hence used up by MMIO)
    _____ is the amount of free RAM space left for applications/other
    MMIO space for devices/components in total takes up 500MB of RAM
    MMIO space for 256MB/GPU takes up 256MB of RAM

    Config 2 - Vista32Bit 3GB RAM

    3GB is the amount of RAM available to OS (all 3GB can be accessed by OS)
    _____ is the amount of free RAM space left for applications/other
    MMIO space for devices/components in total takes up _____ of RAM
    MMIO space for 256MB/GPU takes up 256MB of RAM

    Can anyone pls fill in the blank?!
    Hence any real benefits upgrading from 3GB to 4GB?!
     
    Last edited by a moderator: May 8, 2015
  2. aan310

    aan310 Notebook Virtuoso

    Reputations:
    738
    Messages:
    3,811
    Likes Received:
    2
    Trophy Points:
    106
    first blank will be 3gb, 2.99gb, 2.98 gb or 2.96 gb..... second, idk
     
  3. aan310

    aan310 Notebook Virtuoso

    Reputations:
    738
    Messages:
    3,811
    Likes Received:
    2
    Trophy Points:
    106
    i think in 4gb you get .12gb more.... but i have never used mroe than 37% of my ram in vista with 4gb.... and that was running ilistrator, photoshopcs3 and a video in youtube
     
  4. nic.

    nic. Notebook Evangelist

    Reputations:
    97
    Messages:
    649
    Likes Received:
    0
    Trophy Points:
    30
    Wait a sec...

    256MB GPU takes up 256MB of RAM?

    I thought GPU has their own onboard memory? Or you are referring to turbo cache?
     
  5. aan310

    aan310 Notebook Virtuoso

    Reputations:
    738
    Messages:
    3,811
    Likes Received:
    2
    Trophy Points:
    106
    i was assuming he meant shared memory
     
  6. surefire

    surefire Notebook Consultant

    Reputations:
    26
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    30
    co http://support.microsoft.com/kb/929605

    in reference to that article

    it says every component/device takes up its own memory-mapped I/O (MMIO) space.
    256MB GPU takes up 256MB of RAM (NOT talking about turbocache here)
    all other components in total take up approx 500MB
    but this is for a 4GB system.
    what of a 3GB system? what will the numbers be?
     
  7. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    The amount of RAM available to the OS is exactly the amount of RAM left for applications.

    So 3.12 and 3GB respectively.

    Also note that the 3.12 value is *not* fixed. It depends on system hardware, drivers and bios.
    Some systems will show up to around 3.6GB available.

    As for the other part:

    A 256MB GPU doesn't necessarily use exactly 256MB of the memory space. It might use more, or it might use (a lot) less. There's no rule that all 256MB must be memory-mapped at all times. That's up to the driver.
    In the first case, all we know is that *all in all*, 0.88GB is set aside for memory mapped hardware. You don't know that exactly 256MB goes to the GPU. But 0.88GB is memory mapped in total, which means the maximum visible amount of RAM is 4GB - 0.88GB = 3.12GB

    In the second case, no RAM is used because memory mapping does not use RAM. It uses memory addresses, but not the actual RAM. In the first case, 880 million addresses were set aside for memory mapping, which left only 3.12 billion to address actual RAM.

    Roughly the same will be the case in config 2, but if you only have 3GB of RAm to begin with, then 3.12 billion free addresses is sufficient, so no physical memory gets "hidden" by memory mapping.
     
  8. surefire

    surefire Notebook Consultant

    Reputations:
    26
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    30
    hmm thats interesting!
    perhaps the way MMIO works is more complex than i thought

    thanx for reply

    could you elaborate more on this phrase " It uses memory addresses, but not the actual RAM"

    hence my question of 4GB vs 3GB on a 32bit system?!!!
     
  9. n_maher

    n_maher Notebook Consultant

    Reputations:
    6
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    30
    I would suggest reading this regarding the memory limitations in 32-bit Vista.
     
  10. Jalf

    Jalf Comrade Santa

    Reputations:
    2,883
    Messages:
    3,468
    Likes Received:
    0
    Trophy Points:
    105
    Sure. A 32 bit system can deal with exactly 2^32 (or around 4 billion) distinct memory addresses.

    That's a simple consequence of the fact that memory addresses are 32 bits long.
    Same as with phone numbers. If they're 10 digits long (not sure how long they are in the US), there are only 10^10 phone numbers to go around.

    That's called the address space. The set of all possible addresses.
    Since each byte of memory needs its own address, a 32-bit address space can address 2^32 bytes of memory, or 4GB. So we say that the address space is 4GB. (Even if you only have, say, 512MB of RAM installed, you still have a 4GB address space. The CPU still uses 32 bit addresses, so it can still represent enough addresses to cover 4GB of memory, regardless of how much is actually installed. This is important.)

    Ok, so there are only a fixed number of addresses available.
    To be able to use a byte of RAM, it has to have an address. (Just like you need a phone number to be able to use a phone. Otherwise there's no way to refer to your phone on the network, so people can't call you)

    If you have 2GB of RAM, that means you need 2 billion of addresses to cover it all. If you have 3 GB, you need 3 billion addresses, and for 4GB you need all 4 billion addresses.

    And there's the problem. Modern CPU's use these addresses for other things as well. They're also a very convenient way to talk to external hardware. The memory controller can be configured so a range of addresses don't point to RAM, but are instead forwarded to a piece of hardware. So when the CPU wants to send data to the GPU, all it has to do is write it to a previously agreed range of addresses, and then the memory controller jumps in and figures out where to send the data to. (Continuing the phone analogy this might be fax lines or modems. You need them to transfer data, but then they can't also be used for phone traffic)

    Ok, so we need to set aside some addresses for this, so the CPU can talk to all the available pieces of hardware. So hey, let's try to use addresses that would otherwise be unused. On a 3GB system, we need 3 billion addresses to cover all the RAM. That leaves 1 billion unused addresses. We can use those. After all, the entire point with memory mapping is that the memory controller redirects all requests to these addresses, away from RAM, and to an external piece of hardware.

    For the sake of argument, let's assume that you need 800MB of addresses to perform all the necessary memory mapping. On a 3GB system, that's no problem. We'll use 800MB of the unused addresses, and we'll even have 200 million addresses left over in the end. No problem there then.

    Now try the same on the 4GB system. We still only have 4 billion addresses total. And the RAM alone needs... 4 billion addresses. That's not good, because then we won't be able to talk to hardware, so that has to take precedence.

    So we reserve the same 800 MB of addresses for memory mapping, but then there's no longer enough free addresses for all the memory. We only have 3.2GB of addresses left over, but there's still 4GB of RAM. Imagine if your country ran out of phone numbers. Some people just wouldn't be able to get one then, and you wouldn't be able to call them up. As far as the phone network is concerned, these people are invisible, they don't exist. There's no way to get in touch with them.

    The same happens to the 800MB of RAM in this case. The 3.2GB of available addresses are used to cover as much RAM as possible, but in the end, 800MB is left over with no available addresses. So the CPU literally can't contact that chunk of memory.

    Now, as I said in the first post, it's not 800MB that's used for memory mapping. The exact amount depends on the installed hardware, and the drivers for it. It might be anywhere from 400MB to 1GB.
    But the principle is the same. The CPU works with a 4GB address space, which has to cover *both* memory mapping and physical RAM. If the combined sum of the two doesn't exceed 4GB, all is well, and they can just each get a chunk of addresses. But if youhave 4GB of RAM, there's no longer room for both that and memory mapped hardware.

    And as you might have gathered from this, it's nothing specific to Vista, or XP for that matter. Every OS works like this. The only difference is in exactly how much memory is needed for memory mapping.
     
  11. saintalfonzo

    saintalfonzo Notebook Evangelist

    Reputations:
    210
    Messages:
    331
    Likes Received:
    0
    Trophy Points:
    30
    I'm sorry, what was that again? I wasn't paying attention.
     
  12. surefire

    surefire Notebook Consultant

    Reputations:
    26
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    30
    jalf! WOW!
    my brain had to be processing info at 64bit
    and i had to read that 32^32 times before i could finally understand
    thanx for the detailed explanation (designed for only 64bit brains) to read and fully understand
     
  13. surefire

    surefire Notebook Consultant

    Reputations:
    26
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    30
    for a moment i thought my brain's limited 32^32 address space capacity wouldnt suffice
    oh well it had to switch to 64bit operating mode

    i would suggest the same for "saintalfonzo"