1memory Organization
1memory Organization
ORGANIZATION
(PCO303C)
UNIT II
MEMORY ORGANIZATION
CONTENTS
Computers Memory System Overview
Characteristics of Memory System,
The Memory Hierarchy, Semi-Conductor Main Memory types, Cache
Memory
Associative Memory: Match Logic. Read Operation, Write Operation,
Auxiliary Memory: Magnetic Disks, Magnetic Tape,
Virtual Memory
INTRODUCTION
Memory is the faculty of the brain by which data or information is encoded, stored, and
retrieved when needed.
It is the retention of information over time to influence future action.
Similar is the function of computer memory, and it has similarities with the human brain.
But oversimplification in this regard will be hazardous because the human brain is a very
complicated and sophisticated piece of machinery.
It has memory and processing, entwined together, along with the capability for feelings and
emotions which a computer system lacks.
Here we will focus on the memory part of the brain alone (not physically, only functionally).
And try to use it as an analogy for understanding how computer memory works.
Memory is often understood as an informational processing system with explicit and implicit
functioning that is made up of a sensory processor, short-term (or working) memory, and
long-term memory.
This can be related to the computer memory systems as well.
The sensory processor allows information from the outside world to be sensed. This is in the
form of chemical and physical stimuli.
Working memory serves as an intermediate, for understating and retrieving for the brain to
process information.
Information in the form of stimuli is encoded following explicit or implicit functions by the
working memory processor.
The working memory also retrieves information from previously stored material.
Finally, the function of long-term memory is to store data through various
categorical models or systems.
The above three functions serve as an analogy to the computer memory
system.
The Input from various input devices goes into the memory, which
is processed in the Main Memory (Primarily RAM), and the data is
stored in Secondary Memory (Auxiliary Storage) for present or
future processing.
Apart from these three are ROM, the hard encoding of computer memory,
or the framework.
That can be understood as the analogy of human habits, which slowly get
encoded in the behavior, and come naturally without conscious effort once
they are formed.
Let us dive a bit deeper into the computer memory system, and let’s use
the human memory analogy deliberated above for understating it better.
CHARACTERISTICS OF
MEMORY SYSTEMS
The complex subject of computer memory is made more manageable if we classify memory
systems according to their key characteristics.
The most important of these are as follows:
1. Location: Location refers to whether memory is internal and external to the computer.
Internal memory: internal memory is often equated with main memory.
The processor requires its own local memory, in the form of registers
The control unit portion of the processor may also require its own internal memory.
Cache is another form of internal memory.
External memory consists of peripheral storage devices, such as disk and tape, that are
accessible to the processor via I/O controllers.
2. Capacity :For internal memory, this is typically expressed in terms of bytes (1 byte = 8
bits) or words. Common word lengths are 8, 16, and 32 bits.
External memory capacity is typically expressed in terms of bytes.
3. Unit of transfer: For internal memory, the unit of transfer is equal to the number of
electrical lines into and out of the memory Module.
This may be equal to the word length, but is often larger, such as 64, 128, or 256 bits.
For main memory, this is the number of bits read out of or written into memory at a time. The
unit of transfer need not equal a word or an addressable unit.
For external memory, data are often transferred in much larger units than a word, and these
are referred to as blocks.
4. Access Methods
Sequential access: Start at the beginning and read through in order
Access time depends on location of data and previous location
The time to access an arbitrary record is highly variable (need high space to store data). e.g.
tape
Direct access: Individual blocks have unique address
Access is by jumping to vicinity(the area near ) plus sequential search
Access time depends on location and previous location e.g. disk
Transfer rate: This is the rate at which data can be (moved) transferred into or out of a memory
unit
For random-access memory, it is equal to 1/(cycle time).
6. Physical Types: A variety of physical types of memory have been employed.
The most common today are semiconductor memory, magnetic surface memory, used for disk
and tape, and optical and magneto-optical.
7. Physical Characteristics:
In a volatile memory, information decays naturally or is lost when electrical power is switched
off.
In a nonvolatile memory, information once recorded remains without deterioration until
deliberately changed; no electrical power is needed to retain information. Magnetic-surface
memories are nonvolatile.
Semiconductor memory (memory on integrated circuits) may be either volatile or nonvolatile.
Nonerasable memory cannot be altered, except by destroying the storage unit. Semiconductor
memory of this type is known as read-only memory (ROM). Of necessity, a practical
nonerasable memory must also be nonvolatile.
8. Organization:
For random-access memory, the organization is a key design issue.
In this context, organization refers to the physical arrangement of bits to form words.
MEMORY HIERARCHY:
To achieve greatest performance, the memory must be able to keep up with the processor.
That is, as the processor is executing instructions, we would not want it to have to pause
waiting for instructions or operands.
For a practical system, the cost of memory must be reasonable in relationship to other
components.
As might be expected, there is a trade-off among the three key characteristics of memory:
capacity, access time, and cost.
A variety of technologies are used to implement memory systems, and across this spectrum of
technologies, the following relationships hold:
Faster access time, greater cost per bit
Greater capacity, smaller cost per bit
Greater capacity, slower access time
A typical hierarchy is
illustrated in the
Figure . As one goes
down the hierarchy,
the following occur:
Decreasing cost per
bit
Increasing capacity
Increasing access
time
Decreasing
frequency of access
of the memory by
the processor
HOW COMPUTER PROCESSES INFORMATION
This is one layout we all are very familiar with. It’s the most basic of the
computer layout which sacrifices some details for ease of understanding.
If we follow the data flow, it comes as input from input devices and goes
straight into Memory, which Storage Unit represents.
1. Primary Storage
2. Secondary Storage
The nomenclature creates a hierarchy, where one memory is superior to the
other.
The term “memory” is often a colloquial short-hand with the term “primary
storage”. Secondary storage or memory is often called “storage”.
The two “memories” of the processor, which are housed inside the Central
Processing Unit (CPU) are Registers and Cache.
Though they are kind-of memories, but generally studied out of the
memory system.
These are the most expensive, and fastest memory access to the CPU. Let
us have a look at them first.
THE MEMORY OF THE CPU
Registers:
Registers are the small storage locations used by the CPU to store data and
instructions.
They are built into the processor itself. Hence these memory locations can
be accessed by the processor directly.
Registers are measured by the number of bits they can hold, for example,
an “8-bit register”, “32-bit register” or a “64-bit register”.
32-bit and 64-bit are commonly used to describe processor architecture or
processor design. A 32-bit processor has a 32-bit register, which can store
2^32 or 4,294,967,296 values.
When trying to read from or write to a location in the main memory, the
processor first checks whether the data from that location is already in the
cache.
If so, the processor will read from or write to the cache instead of the much
slower main memory.
This helps to reduce the average cost (time or energy) to access data from
the main memory.
The small memories which are closer to the CPU can operate faster than
the much larger main memory.
Most CPUs since the 1980s have used one or more type of caches.
PRIMARY MEMORY (ALSO KNOWN AS MAIN MEMORY, INTERNAL MEMORY, OR PRIME MEMORY)
Non Volatile means that no power is needed to keep the memory alive.
The data stored in ROM cannot be electronically modified after the manufacture of
the memory device.
The memory of our computer, which is built-in into it, when the computer is being
manufactured/assembled in the factory, is the ROM.
Data Stored in ROM is not alterable, non-modifiable easily.
Hence, that software that is rarely changed during the life of the computer
system is stored in a ROM memory device.
In the Mask ROM IC, data is hard encoded, physically, during the manufacturing. So it can
be programmed only during the fabrication. This creates many hurdles:
1. Because each Mask ROM is programmed during manufacturing, its cost becomes very
high, since users must contract with a foundry to produce a custom design. It is only
possible to order it in large quantities.
2. Getting a ROM manufactured is time taking process, as each ROM is customized.
3. For R&D use, where the users have to do trial and error or modify and improve the
contents in the memory for refining a design, Mask ROM becomes impractical.
4. If ROM is faulty, and the product is shipped, it can’t be corrected without Total Recall.
PROGRAMMABLE ROM (PROM):
As soon as the program ends (you close the browser or file), the RAM gets
free from its data.
Hence, the larger the RAM, the faster the computer works with more
number of simultaneous programs.
Say, for example you are working on multiple video files and at the same
time, open many web browsers.
The RAM requirement goes up with each new program being opened.
This requires lesser power and gives faster access and speed.
And hence data (which is stored in the form of energy) is also lost.
Therefore a periodic refresh of power is required to keep it functioning.
This requires higher power consumption and slower access to data than
SRAM.
But simultaneously, it’s denser in memory (more memory in the same size)
and hence has a lower cost.