EC206 CO Module5 Lecture2 1
EC206 CO Module5 Lecture2 1
Chapter – 6
Memory System
6.1 Microcomputer Memory
Memory is an essential component of the microcomputer
It stores binary instructions and datum for the microcomputer.
system.
The memory is the place where the computer holds current programs and data that are in
use.
None technology is optimal in satisfying the memory requirements for a computer
system.
Computer memory exhibits perhaps the widest range of type, technology, organization,
performance and cost of any feature of a computer system.
The memory unit that communicates directly with the CPU is called main memory.
Devices that provide backup storage are called auxiliary memory or secondary memory.
Location
• Processor memory: The memory like registers is included within the processor and
termed as processor memory.
• Internal memory: It is often termed as main memory and resides within the CPU.
• External memory: It consists of peripheral storage devices such as disk and magnetic
tape that are accessible to processor via i/o controllers.
Capacity
• Word size: Capacity is expressed in terms of words or bytes.
— The natural unit of organisation
• Number of words: Common word lengths are 8, 16, 32 bits etc.
— or Bytes
Unit of Transfer
• Internal: For internal memory, the unit of transfer is equal to the number of data lines
into and out of the memory module.
• External: For external memory, they are transferred in block which is larger than a
word.
• Addressable unit
— Smallest location which can be uniquely addressed
— Word internally
— Cluster on Magnetic disks
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 1
Computer Organization and Architecture Chapter 6 : Memory System
Access Method
• Sequential access: In this access, it must start with beginning and read through a
specific linear sequence. This means access time of data unit depends on position of
records (unit of data) and previous location.
— e.g. tape
• Direct Access: Individual blocks of records have unique address based on location.
Access is accomplished by jumping (direct access) to general vicinity plus a
sequential search to reach the final location.
— e.g. disk
• Random access: The time to access a given location is independent of the sequence of
prior accesses and is constant. Thus any location can be selected out randomly and
directly addressed and accessed.
— e.g. RAM
• Associative access: This is random access type of memory that enables one to make a
comparison of desired bit locations within a word for a specified match, and to do this
for all words simultaneously.
— e.g. cache
Performance
• Access time: For random access memory, access time is the time it takes to perform a
read or write operation i.e. time taken to address a memory plus to read / write from
addressed memory location. Whereas for non-random access, it is the time needed to
position read / write mechanism at desired location.
— Time between presenting the address and getting the valid data
• Memory Cycle time: It is the total time that is required to store next memory access
operation from the previous memory access operation.
Memory cycle time = access time plus transient time (any additional time required
before a second access can commence).
— Time may be required for the memory to “recover” before next access
— Cycle time is access + recovery
• Transfer Rate: This is the rate at which data can be transferred in and out of a
memory unit.
— Rate at which data can be moved
— For random access, R = 1 / cycle time
— For non-random access, Tn = Ta + N / R; where Tn – average time to read or
write N bits, Ta – average access time, N – number of bits, R – Transfer rate
in bits per second (bps).
Physical Types
• Semiconductor
— RAM
• Magnetic
— Disk & Tape
• Optical
— CD & DVD
• Others
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 2
Computer Organization and Architecture Chapter 6 : Memory System
— Bubble
— Hologram
Physical Characteristics
• Decay: Information decays mean data loss.
• Volatility: Information decays when electrical power is switched off.
• Erasable: Erasable means permission to erase.
• Power consumption: how much power consumes?
Organization
• Physical arrangement of bits into words
• Not always obvious
- e.g. interleaved
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 3
Computer Organization and Architecture Chapter 6 : Memory System
CPU logic is usually faster than main memory access time, with the result that processing
speed is limited primarily by the speed of main memory
The cache is used for storing segments of programs currently being executed in the CPU
and temporary data frequently needed in the present calculations
The memory hierarchy system consists of all storage devices employed in a computer
system from slow but high capacity auxiliary memory to a relatively faster cache memory
accessible to high speed processing logic. The figure below illustrates memory hierarchy.
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 4
Computer Organization and Architecture Chapter 6 : Memory System
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 5
Computer Organization and Architecture Chapter 6 : Memory System
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 6
Computer Organization and Architecture Chapter 6 : Memory System
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 7
Computer Organization and Architecture Chapter 6 : Memory System
Types of ROM
Programmable ROM
(PROM)o It is non-volatile and may be written into only once. The writing process is
performed electrically and may be performed by a supplier or customer at
a time later than the original chip fabrication.
Erasable Programmable ROM (EPROM)
o It is read and written electrically. However, before a write operation, all
the storage cells must be erased to the same initial state by exposure of the
packaged chip to ultraviolet radiation (UV ray). Erasure is performed by
shining an intense ultraviolet light through a window that is designed into
the memory chip. EPROM is optically managed and more expensive than
PROM, but it has the advantage of the multiple update capability.
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 8
Computer Organization and Architecture Chapter 6 : Memory System
External Memory
The devices that provide backup storage are called external memory or
auxiliary memory. It includes serial access type such as magnetic tapes and
random access type such as magnetic disks.
Magnetic Tape
A magnetic tape is the strip of plastic coated with a magnetic recording
medium. Data can be recorded and read as a sequence of character through
read / write head. It can be stopped, started to move forward or in reverse or can
be rewound. Data on tapes are structured as number of parallel tracks running
length wise. Earlier tape system typically used nine tracks. This made it possible
to store data one byte at a time with additional parity bit as 9th track. The
recording of data in this form is referred to as parallel recording.
Magnetic Disk
A magnetic disk is a circular plate constructed with metal or plastic coated
with magnetic material often both side of disk are used and several disk stacked on
one spindle which Read/write head available on each surface. All disks rotate
together at high speed. Bits are stored in magnetize surface in spots along
concentric circles called tracks. The tracks are commonly divided into
sections called sectors. After the read/write head are positioned in specified track
the system has to wait until the rotating disk reaches the specified sector under
read/write head. Information transfer is very fast once the beginning of sector
has been reached. Disk that are permanently attached to the unit assembly and
cannot be used by occasional user are called hard disk drive with removal disk is
called floppy disk.
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 9
Computer Organization and Architecture Chapter 6 : Memory System
Optical Disk
The huge commercial success of CD enabled the development of low cost
optical disk storage technology that has revolutionized computer data storage. The
disk is form from resin such as polycarbonate. Digitally recorded
information is imprinted as series of microscopic pits on the surface of poly
carbonate. This is done with the finely focused high intensity leaser. The
pitted surface is then coated with reflecting surface usually aluminum or
gold. The shiny surface is protected against dust and scratches by the top coat of
acrylic.
Information is retrieved from CD by low power laser. The intensity of
reflected light of laser changes as it encounters a pit. Specifically if the laser
beam falls on pit which has somewhat rough surface the light scatters and
low intensity is reflected back to the surface. The areas between pits are called
lands. A land is a smooth surface which reflects back at higher intensity. The
change between pits and land is detected by photo sensor and converted into
digital signal. The sensor tests the surface at regular interval.
DVD-Technology
Multi-layer
Very high capacity (4.7G per layer)
Full length movie on single disk
Using MPEG compression
Finally standardized (honest!)
Movies carry regional coding
Players only play correct region
films
DVD-Writable
Loads of trouble with standards
First generation DVD drives may not read first generation DVD-W
disks
First generation DVD drives may not read CD-RW disks
6.5 Cache memory principles
Principles
o Intended to give memory speed approaching that of fastest memories available but with
large size, at close to price of slower memories
o Cache is checked first for all memory references.
o If not found, the entire block in which that reference resides in main memory is stored in
a cache slot, called a line
o Each line includes a tag (usually a portion of the main memory address) which identifies
which particular block is being stored
o Locality of reference implies that future references will likely come from this block of
memory, so that cache line will probably be utilized repeatedly.
o The proportion of memory references, which are found already stored in cache, is called
the hit ratio.
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 10
Computer Organization and Architecture Chapter 6 : Memory System
Cache memory is intended to give memory speed approaching that of the fastest
memories available, and at the same time provide a large memory size at the price of less
expensive types of semiconductor memories. There is a relatively large and slow main
memory together with a smaller, faster cache memory contains a copy of portions of
main memory.
When the processor attempts to read a word of memory, a check is made to determine if
the word is in the cache. If so, the word is delivered to the processor. If not, a block of
main memory, consisting of fixed number of words is read into the cache and then the
word is delivered to the processor.
The locality of reference property states that over a short interval of time, address
generated by a typical program refers to a few localized area of memory repeatedly. So if
programs and data which are accessed frequently are placed in a fast memory, the
average access time can be reduced. This type of small, fast memory is called cache
memory which is placed in between the CPU and the main memory.
When the CPU needs to access memory, cache is examined. If the word is found in
cache, it is read from the cache and if the word is not found in cache, main memory is
accessed to read word. A block of word containing the one just accessed is then
transferred from main memory to cache memory.
Compiled By: Er. Hari Aryal [[email protected]] Reference: W. Stallings & M. Mano | 11