Home Topic 2 Last Next


Describe primary memory.


Teaching Note:

Distinguish between random access memory (RAM) and read-only memory (ROM), and their use in primary memory.

Sample Question 1 - FORMER CURRICULUM:

(b) (i) State typical values for both primary and cache memory for a modern
desk-top computer. [2 marks]

(ii) Explain how the use of cache memory can lead to a more efficient running
of the computer. [3 marks]


Sample Question 2 - FORMER CURRICULUM:

**** JSR Note: Question (c) includes reference to virtural memory, which you'll get more details about in 2.1.6, but virtual memory is basically using part of the hard drive to act as primary (RAM) memory.

(c) Virtual memory is normally available in modern desk-top computers.
(i) Explain the advantage of using virtual memory. [3 marks]

(ii) Explain why the size of the primary memory still needs to be considered when
running large programs, even when virtual memory has been incorporated. [2 marks]

JSR Notes

What is primary memory?

From the teaching note above: "Describe primary memory"... "distinguish(ing) between random access memory (RAM) and read-only memory (ROM), and their use in primary memory": All right, here it goes:

Primary memory is the kind of computer memory which directly interacts with the CPU. Though you'll note that it can be seen as "primary" not only because of this, but because the computer cannot operate without it. Contrast this to secondary memory - in which all programs and all data are persistently stored; secondary memory does not typically interact directly with the CPU, and, also, theoretically, the computer can operate without it.

There are two main kinds of primary memory, RAM, and ROM.


RAM, which stands for Random Access Memory, is the memory in which instructions and data being worked on at any given time are kept.

("Random" does not mean that the memory is organized in a random form, rather it means that individual locations can be accessed directly. This was in contrast to the alternative at the time, in the early development of computers, during which the term RAM was coined. Back in those days, with tape drives, you had to fast-forward and re-wind to get to any particular spot.)

What gets loaded into RAM?

The first thing loaded into RAM memory, when a computer starts up, is the operating system (i.e. Mac OS, or Windows etc.) Then, as applications are launched (such as Chrome, or Photoshop), copies of much of the instructions of those applications get transferred from the hard drive to RAM. The same goes for data files associated with those applications (such as a Word .doc file, or a Photoshop .psd file).

RAM stores data and instructions in the form of active electrical circuits (with an "on" circuit representing a binary 1, and "off" representing a binary "0".)

Because of the electrical nature of RAM, it is know as a "volatile" form of memory, meaning that in the absence of electricity, it vanishes.

You don't need to know this, but you'll see these terms often associated with RAM: the two most common types of RAM are SRAM (Static RAM), and DRAM (Dynamic RAM). DRAM it is "dynamic" because its charge has to be refreshed every few milliseconds; this makes it generally faster (though more expensive). The speed of DRAM makes it a primary option for the use in cache, though the RAM of a computer is also often a kind of DRAM.


ROM, which stands for Read Only Memory is the primary memory that is used to store the instructions and data related to specific hardware components of a particular computer, which don't change. Since the hardware with which the ROM is associated does not change, the ROM itself is usually made in an "immutable" way, meaning that it cannot be changed. Another way of putting it is that it is "read only" - the computer can read instructions from it, but cannot change them (i.e. the computer cannot "write to" the ROM). (Though you'll note that there are varieties of ROM that actually can be written to.)

What is kept in ROM

A lot of what is kept in ROM is used to startup (or "boot up") a device, particularly the operations associated with input and output, which have to be understood by the computer before even the operating system can be loaded into RAM. This part of ROM is know as the "BIOS" - Basic Input/Output System. (Additional information about how to start up the operating system is held in the Master Boot Record of the hard drive itself, but it takes the ROM's BIOS to look through and load it.) Other instructions of limited size, which allow the specific motherboard to use certain hardware components, like the network card or the audio speaker, are also stored on ROM.

To distinguish between RAM and ROM, you could look at five things:     



Quite large (Gigabytes) Small (Kilobytes - to a couple of Megabytes)

Running applications and storing open data Mainly instructions used for running various hardware components
When loaded:
Applications and data are loaded as needed Mainly at startup time
Not permanent, in fact "volatile", meaning gone in the absence of electricity Permanent (in some cases via a small battery)
Where/what look like: Rectangular microprocessing chips arranged uniformly on circuit boards that fit in slots on the motherboard - can be removed or upgraded Small flat square microprocessing chip attached directly to the motherboard - cannot be removed


SDRAM Module
By Wollschaf CC BY-SA 3.0

32k*8 ROM chip.
Die size 8232x8973ยตm

(8.9 mm - i.e. really small!)
By ZeptoBars - CC BY 3.0


A Final reminder that differ though they may, RAM and ROM are both "primary" because they are both needed; you cannot run a computer without RAM and ROM, though, technically you could without "secondary" storage (you'd just have to keep your computer on all the time). Don't forget that when the terms primary and secondary memory were coined, computers were still experimental things that did calculations, but didn't necessarily have secondary memory long term storage facility.







JSR Notes - FORMER CURRICULUM - 3.2.5 Outline the characteristics of primary memory and the difference between volatile and non-volatile memory.:

Stating that there are two main kinds of primary memory - RAM and ROM, and that cache is "increasingly" used is a bit of an antiquated statement. Rather, you should consider there to be three main categories of primary memory: RAM, ROM, and cache.

Also antiquated are the typical sizes stated: In 2009, RAM in PCs is in the order of GBs. Typically, new machines will have between 4 and 16 GB. (Note that now that the 4GB limit has been broken by having 64-bit systems, more than 4GB is possible.)

Since ROM still only needs to keep text-based startup etc. information, it will still be only be in the range of KB, with 1024 KB a typical value (this is actually 1 MB).

In terms of virtual memory, in a lot of systems, you manually determine the amount of your hard drive that can be used for virtual memory. But don't think that virtual memory is something only enabled because of limited primary memory. Mac OS X, for example, allots virtual memory for all applications. You'll also note that the memory management of OSX and other UNIX-based operating systems takes full advantage of swapping between RAM and virtual memory "on-the-fly", as memory needs change in real-time. This is done, naturally enough, because real RAM memory is indeed much faster than part of the hard drive being treated as virtual memory.