CPU & Memory
How memory works | Starting your PC | AccessingJargon | RAM disk

b_html2.gif (189 bytes)RAM Cache | MS-DOS startup

Random Access Memory

b_dfn.gif (837 bytes)Random Access Memory (RAM):
The part of the computer that stores instructions to be performed, and data that are to be processed.

Here we will take a look at how RAM interacts with the rest of the computer hardware and software.

[SIMM]

How memory works

[memory] The CPU's central processor is designed that it will only execute a sequence of program instructions if they are stored in memory it is directly connected to.

Memory is a circuit capable of storing a list of numbers, and may be though of a number warehouse. Imagine a warehouse full of small pigeon holes. Each one capable of storing a number (called a byte) and with a unique address, the first being address 0, then 1, and so on...

The processor may say "put this number in address 345", or "what number is in address 223?"

Memory uses microscopic switches to represent numbers in base 2 (binary). One byte contains 8 switches (bits) capable of storing any whole number between 0 and 255.

Each byte is made up of eight switches.

[Reference] PC essentials: Part 3: the motherboard 1994, Oct

Starting up your PC - RAM interaction

To illustrate the importance of RAM, consider the situation of Starting up your PC and loading in an application.

1. PC is turned on

2. The Control Unit accesses ROM for startup instructions; eg. Checking the Base Hardware components.

           +-----+
           |     |       +[A:]----+     +[C:]--------+
 +-----+   |     |       |        |     |            |
 |     |   |     |       |        |     |            |
 | ROM |   | RAM |       | Floppy |     | Hard Disk  |
 +-----+   +-----+       +--------+     +------------+

3. A ROM instruction then attempts to access a floppy drive (Drive A) -- note on your PC the diskette light just after power on.

           +-----+
           |     |       +[A:]----+     +[C:]--------+
 +-----+   |     |       |        |     |            |
 |     |   |     |       |        |     |            |
 |     |   |     |       |        |     |            |
 +-----+   +-----+       +--------+     +------------+
 | ROM |   | RAM |       | Floppy |     | Hard Disk  |

4. If there is no SYSTEM disk in drive A, a Hard Drive is sought (Drive C).

           +-----+
           |     |       +[A:]----+     +[C:]--------+
 +-----+   |     |       |        |     |            |
 |     |   |     |       |        |     |            |
 |     |   |     |       |        |     |Command.com |
 +-----+   +-----+       +--------+     +------------+
 | ROM |   | RAM |       | Floppy |     | Hard Disk  |

5. The System Software is located (eg. for MS-DOS; COMMAND.COM) and loaded into RAM

           +-----+
           |     |       +[A:]----+     +[C:]--------+
 +-----+   |     |       |        |     |            |
 |     |   |     |       |        |     |            |
 |     |   |     |       |        |     |Command.com |
 +-----+   +-----+       +--------+     +------------+
 | ROM |   | RAM |       | Floppy |     | Hard Disk  |

6. The instructions for accessing files from the disk; such as, COPY, DEL, DIR are contained in RAM (in Command.COM).

          +-----------+
          |           |  +[A:]----+  +[C:]--------+
 +-----+  |           |  |        |  |            |
 |     |  |           |  |        |  |            |
 |     |  |Command.com|  |        |  |Command.com |
 +-----+  +-----------+  +--------+  +------------+
 | ROM |  | RAM       |  | Floppy |  | Hard Disk  |
7. An application may be loaded; we will consider two cases; 

Eg. Lotus 123

Type "123" or "LOTUS" at the DOS prompt, and the instructions (Software) are loaded into RAM. Finally your spreadsheet is stored in RAM until saved to a Disk.

RAM - Lotus

+------+-------------------------+
|      | Free Memory             |
|  :   | :                       |
|  :   | :                       |
|  :   | Spreadsheet Document(s) |
|  :   | Lotus123   (123.COM)    |
|  0kb | MS-DOS Operating System |
+------+-------------------------+

Eg. Windows;

Type "WIN" at the DOS prompt and the instructions stored in WIN.EXE are loaded into RAM. As windows applications are loaded, they are also loaded into RAM, along with their respective data files.

RAM - Windows

+------+-------------------------+
|      | Free Memory             |
|  :   | :                       |
|  :   | :                       |
|  :   | Paint Document          |
|  :   | Windows Paintbrush      |
|  :   | WP Document(s)          |
|  :   | Windows Word Processor  |
|  :   | Windows   (WIN.EXE)     |
|  0kb | MS-DOS Operating System |
+------+-------------------------+

Accessing

How do we access a particular memory location to;

Memory available for the computer user can be accessed via

With an application program, you do not have direct control over where the data is stored in memory, with a programming language you can exert more control over where data is stored.

Operating Systems such as OS/2 will not allow direct memory addressing, as Virtual Storage is used, where both the Hard Disk and RAM interact as if they we one unit..

Jargon

Extended Memory:
Memory above 1Mb in 286 and later PC's. Can only be used by special protected mode programs such as Windows 3.0. Standard DOS Programs cannot directly access extended memory, though it can store RAM drives, disk caches and for creating HMA
High Memory Area (HMA)
an extra 64Kb "bank" of memory DOS can access on systems with an Extended Memory Specification driver. The HMA can be controlled by only one program. eg. Windows or a Network driver. By placing an application into HMA, you save conventional memory.
Upper Memory Blocks (UMB)
The area in memory in DOS based PC's from 640Kb to 1Mb. This was originally set aside for future expansion, video memory, adaptor cards and additional BIOS. As PC's evolved little was used. This allowed UMBs to be created, and Temporary Stay Resident (TSR) programs to be loaded into the UMB's to free up conventional memory.
Conventional Memory
The lower 640KB of memory in which DOS runs, loads applications and where programs manipulate their data.

[Reference] (Wright, H. 1996, Aug) & (Santoni A, 1996 Oct)

hwcmram1.gif (48562 bytes)
  • b_dfn.gif (837 bytes)RAM Socket:
    A small card where Memory chips are mounted onto. Either
    b_dfn.gif (837 bytes) Single in-line memory module (SIMM):. with either 30 or 72 pins or
    Dual in-line memory module (DIMM):. with 168 pins.
  • b_dfn.gif (837 bytes)RAM Speed:
    Memory chips are designed to operate at certain maximum speeds, typically 60,70 or 80 nanoseconds (billionths of a second).
  • b_dfn.gif (837 bytes)RAM Parity:
    Memory modules are either parity or non-parity. A parity module has an extra chip (usually a ninth) for error checking. Some motherboards work with either, but they cannot be mixed.
  • b_dfn.gif (837 bytes)RAM Size/sockets:
    Simm sockets are usually arrranged in pairs. Both sockets in a single bank must be filled with Simms of identical memory size.
    [Reference] (Steers, K. 1997, Sep)

RAM disk

b_dfn.gif (837 bytes)RAM Disk: A portion of RAM is reserved and made to simulate a Disk Drive.

[Memory SIMM]

  • Has all the characteristics of a disk drive, but obviously data transfer is at the speed of the RAM.
  • Needs to be formatted before use.
  • Is destroyed when the computer is turned off (as it is part of RAM or volatile memory), so will need to be re-constructed each time the computer is turned on.

[Rev: 23/8/98] Jun-97 © 1997-98 V/2-Com (Verhaart), P O Box 8415, Havelock North, New Zealand.