Memory - Disk and/or RAM

Disk vs RAM

    There seems to be some confusion on the term memory. I have talked to people, who think they have a lot of memory if they have a large 20GB hard disk, but in reality they only have 32MB of RAM. When referring to memory in computers, it really means how much RAM (Random Access Memory) you have. However, to add to this confusion is the concept of Virtual Memory. This is where the HD (hard disk) comes into play. The computer wizards have devised ways to use the HD as supplemental memory. In other words, it allows you to run programs that require more memory than you physically have. It does this by swapping memory chunks in and out of your system to the HD. However, it is slower and causes a lot of thrashing on your hard disk. Your games and other video will be jerky and slow. Doubling or tripling your RAM is one of the easiest ways to speed up your PC. Most of the time this is cheaper than buying a new computer.

    The following description, which I thought was excellent, came from MU_Engineer on an AMD Forum.

  1. A standard 32-bit x86 OS has 32 bits (4 GB) of address space. The x86 architecture uses the "upper" (from 4.00 GB on down) address space to use for addressing devices, such as the PCI bus. So the device address space consumes part of the total address space. The physical memory is simply used as a portion of the 4 GB virtual address space that data can be stored at for later retrieval. Because the device address space consumes address space and takes precedence over application data memory usage, you cannot use more than 3.something GB of RAM for applications. This is pretty well known.
  2. The OS's kernel needs its own address space to work as well. This also eats into the amount of memory that a user's application can use. However, the amount of address space the kernel can use can be variable, and the user address space/kernel address space ratio is called the user/kernel split. Typically the split is 2 GB/2 GB in a 32-bit OS, which lets an application consume no more than 2 GB address space. That means that there is no benefit of having more than 2 GB RAM in the machine. This can be changed to 3 GB/1 GB to allow applications to use up to 3 GB address space (and 3 GB of RAM for data storage.)
  3. The effect of #2 varies. On Windows, programs have to be specifically compiled to take advantage of the 3 GB address space. IIRC, this is not true of the *nixes. Reducing the kernel's address space can have repercussions. It can slow down the system and at least on Windows make the computer less stable.
  4. Using a trick like PAE can allow the OS to have a greater-than-32-bit address space, but it requires a CPU that has the extra functionality to handle the extra address space. x86 CPUs with PAE can address up to 64 GB of space, however, 32-bit programs can individually only access 4 GB of address space unless a hack like address-window sliding is used. The program would need to specifically be written to use that functionality. Windows XP SP2 has PAE disabled so you cannot use more than 4 GB address space with that OS. However, Windows Server 2003 does have the option of a working PAE, as does Linux and other *nixes IIRC.
So to make a long story short:
1. An unmodified 32-bit OS can "see" only 3.x GB RAM if >= 4 GB is installed.
2. An unmodified version of Windows XP and most default builds of x86 Linux can only use 2 GB of RAM for programs.
3. Modification of Windows XP can allow the user to use 3 GB of RAM for programs, but compatibility and stability may suffer and specially-aware programs are needed.
4. Modification of 32-bit x86 Linux can allow the user to use 3 GB of RAM for programs, but stability may suffer. (I've not done this and few others do.)
5. Modification of Windows Server 2003 or Linux and perhaps other *nixes can allow the OS to see up to 64 GB RAM.
6. Modification of 32-bit programs can allow them to see more than 4 GB RAM.

SMP vs BIGSMP -- Which one to use...

Some people are confused by the differences between the SMP and BIGSMP kernels included in SUSE Linux, and which one to use for their system. A quick look at the build configuration for both kernels shows several differences, but the most significant involves the supported amount of RAM and number of CPUs.

The SMP kernel contains the following parameters:

CONFIG_HIGHMEM4G=y
CONFIG_NR_CPUS=32

Thus allowing a maximum of 4G RAM and 32 processors.

The BIGSMP kernel, however, has these:

CONFIG_HIGHMEM64G=y
CONFIG_NR_CPUS=128

Enabling support for 64G memory and 128 processors.

If a system has either more than 4G RAM or more than 32 processors, the BIGSMP kernel must be used to fully utilize the system.

???

    

    




Copyright © 2004-2004 Chuck Taylor. All rights reserved.