You are on page 1of 47

Addis Ababa science & Technology University

College of Electrical & Mechanical Engineering

Course Name :Computer Architecture & Organization

Instructor Name : Tayachew Fikire

Mail Address : tayachew.fikire@aastu.edu.et

Major References : William Stallings: Computer Organization and Architecture


Chapter3 :Memory system

Lesson Objective:

• The objective of this lesson is to introduce students various types of

memories in a computer system.

Topics to be covered
• Cache Memory
• Internal memory
• External memory

Prepared by: Tayachew Fikire Computer architecture & organization 2


Part 1

Internal Memory

Prepared by: Tayachew Fikire Computer architecture & organization 3


Memory- introduction

Prepared by: Tayachew Fikire Computer architecture & organization 4


Memory- introduction

Prepared by: Tayachew Fikire Computer architecture & organization 5


Memory- Introduction

Prepared by: Tayachew Fikire Computer architecture & organization 6


Memory- Introduction

Prepared by: Tayachew Fikire Computer architecture & organization 7


Memory- Introduction

Prepared by: Tayachew Fikire Computer architecture & organization 8


Semi-conductor Memory types
Memory Type Category Erasure Write Volatility
Mechanism
Random-access Read-write Electrically,
Electrically Volatile
memory (RAM) memory byte-level
Read-only Masks
memory (ROM) Read-only
Not possible
Programmable memory
ROM (PROM)
Erasable PROM UV light, chip-
(EPROM) level Nonvolatile
Electrically Electrically
Read-mostly Electrically,
Erasable PROM memory byte-level
(EEPROM)
Electrically,
Flash memory
block-level

Prepared by: Tayachew Fikire Computer architecture & organization 9


Characteristics of Memory Systems
Location Performance
Internal (e.g. processor registers, cache, Access time
main memory) Cycle time
External (e.g. optical disks, magnetic disks, Transfer rate
tapes) Physical Type
Capacity Semiconductor
Number of words Magnetic
Number of bytes Optical
Unit of Transfer Magneto-optical
Word Physical Characteristics
Block Volatile/nonvolatile
Access Method Erasable/nonerasable
Sequential Organization
Direct Memory modules
Random
Associative

Prepared by: Tayachew Fikire Computer architecture & organization 10


Semiconductor memory : cell operation

 The basic element of a semiconductor


memory is the memory cell.
 Although a variety of electronic technologies
are used, all semiconductor memory cells
share certain
properties:
• They exhibit two stable (or semistable)
states, which can be used to represent
binary 1 and 0.
• They are capable of being written into (at least
once), to set the state.
• They are capable of being read to sense the
state.

Prepared by: Tayachew Fikire Computer architecture & organization 11


Semiconductor memory : cell operation

• Most commonly, the cell has three functional


terminals capable of carrying an electrical
signal.
• The select terminal, as the name suggests,
selects a memory cell for a read or write
operation.
• The control terminal indicates read or write.
• For writing, the other terminal provides an
electrical signal that sets the state of the cell
to 1 or 0.
• For reading, that terminal is used for output
of the cell’s state.

Prepared by: Tayachew Fikire Computer architecture & organization 12


SRAM and DRAM
 RAM technology is divided into two technologies:
 Dynamic RAM (DRAM)
 Static RAM (SRAM)

 DRAM

 Made with cells that store data as charge on capacitors

 Presence or absence of charge in a capacitor is interpreted as a binary 1 or 0

 Requires periodic charge refreshing to maintain data storage

 The term dynamic refers to tendency of the stored charge to leak away, even
with power continuously applied

Prepared by: Tayachew Fikire Computer architecture & organization 13


Memory cell structure

Prepared by: Tayachew Fikire Computer architecture & organization 14


Static RAM (SRAM)
 In contrast, a static RAM (SRAM) is a digital device that uses the same logic elements used
in the processor. In a SRAM, binary values are stored using traditional flip-flop logic-gate of
flip-flops).
 A static RAM will hold its data as long as power is supplied to it.
 As in the DRAM, the SRAM address line is used to open or close a switch.
 The address line controls two transistors (T5 and T6 ).
 When a signal is applied to this line, the two transistors are switched on, allowing a read or
write operation.

Prepared by: Tayachew Fikire Computer architecture & organization 15


Prepared by: Tayachew Fikire Computer architecture & organization 16
SRAM and DRAM

Prepared by: Tayachew Fikire Computer architecture & organization 17


Read Only Memory (ROM)

 Contains a permanent pattern of data that cannot be changed or added to

 No power source is required to maintain the bit values in memory

 Data or program is permanently in main memory and never needs to be


loaded from a secondary storage device

 Data is actually wired into the chip as part of the fabrication process
 Disadvantages of this:
 No room for error, if one bit is wrong the whole batch of ROMs must be thrown out
 Data insertion step includes a relatively large fixed cost

Prepared by: Tayachew Fikire Computer architecture & organization 18


Programmable ROM (PROM)
 Less expensive alternative

 Nonvolatile and may be written into only once

 Writing process is performed electrically and may be performed by supplier


or customer at a time later than the original chip fabrication

 Special equipment is required for the writing process

 Provides flexibility and convenience

 Attractive for high volume production runs

Prepared by: Tayachew Fikire Computer architecture & organization 19


Programmable ROM (PROM)
 Less expensive alternative

 Nonvolatile and may be written into only once

 Writing process is performed electrically and may be performed by supplier


or customer at a time later than the original chip fabrication

 Special equipment is required for the writing process

 Provides flexibility and convenience

 Attractive for high volume production runs

Prepared by: Tayachew Fikire Computer architecture & organization 20


Read-Mostly Memory

Flash
EPROM EEPROM
Memory
Electrically erasable
programmable read-only Intermediate between
Erasable programmable
memory EPROM and EEPROM in
read-only memory
both cost and functionality

Can be written into at any


time without erasing prior
contents
Uses an electrical erasing
Erasure process can be
technology, does not
performed repeatedly
Combines the advantage of provide byte-level erasure
non-volatility with the
flexibility of being
updatable in place
More expensive than Microchip is organized so
PROM but it has the that a section of memory
advantage of the multiple More expensive than cells are erased in a single
update capability EPROM action or “flash”

Prepared by: Tayachew Fikire Computer architecture & organization 21


Interleaved Memory

Composed of a collection of
DRAM chips

Grouped together to form a


memory bank

Each bank is independently


able to service a memory read
or write request

K banks can service K requests


simultaneously, increasing
memory read or write rates by
a factor of K

If consecutive words of
memory are stored in different
banks, the transfer of a block
of memory is speeded up

Prepared by: Tayachew Fikire Computer architecture & organization 22


Advanced DRAM Organization
SDRAM
 One of the most critical system bottlenecks when using high-
performance processors is the interface to main internal
memory

 The traditional DRAM chip is constrained both by its internal


architecture and by its interface to the processor’s memory bus
DDR-DRAM
 A number of enhancements to the basic DRAM architecture
have been explored

 The schemes that currently dominate the market are


SDRAM and DDR-DRAM
RDRAM

Prepared by: Tayachew Fikire Computer architecture & organization 23


Synchronous DRAM (SDRAM)

One of the most widely used forms of DRAM

Exchanges data with the processor synchronized to


an external clock signal and running at the full
speed of the processor/memory bus without
imposing wait states

With synchronous access the DRAM moves data in


and out under control of the system clock
• The processor or other master issues the instruction
and address information which is latched by the DRAM
• The DRAM then responds after a set number of clock
cycles
• Meanwhile the master can safely do other tasks while
the SDRAM is processing

Prepared by: Tayachew Fikire Computer architecture & organization 24


Flash Memory
 Used both for internal memory and external memory applications

 First introduced in the mid-1980’s

 Is intermediate between EPROM and EEPROM in both cost and functionality

 Uses an electrical erasing technology like EEPROM

 It is possible to erase just blocks of memory rather than an entire chip

 Gets its name because the microchip is organized so that a section of memory
cells are erased in a single action

 Does not provide byte-level erasure

 Uses only one transistor per bit so it achieves the high density of EPROM

Prepared by: Tayachew Fikire Computer architecture & organization 25


Memory structures

Prepared by: Tayachew Fikire Computer architecture & organization 26


Flash Memory structures
The traditional memory hierarchy has consisted of three
levels
■ Static RAM (SRAM): SRAM provides rapid access
time, but is the most expensive
and the least dense (bit density). SRAM is suitable for
cache memory.

■ Dynamic RAM (DRAM): Cheaper, denser, and slower


than SRAM, DRAM
has traditionally been the choice off-chip main memory.

■ Hard disk: A magnetic disk provides very high bit


density and very low cost per bit, with relatively slow
access times. It is the traditional choice for external
storage as part of the memory hierarchy.
Into this mix, as we have seen, as been added flash
memory. Flash memory has the advantage over
traditional memory that it is nonvolatile.

Prepared by: Tayachew Fikire Computer architecture & organization 27


Cache& main Memory
• Cache memory is designed to combine the memory access
time of expensive, high-speed memory combined with the
large memory size of less expensive, lower-speed memory.
• There is a relatively large and slow main memory together
with a smaller, faster cache memory.
• The cache 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 some fixed
number of words, is read into the cache and then the word is
delivered to the processor. Because of the phenomenon of
locality of reference, when a block of data is fetched into the
cache to satisfy a single memory reference, it is likely that
there will be future references to that same memory location
or to other words in the block.
• Figure b depicts the use of multiple levels of cache. The L2
cache is slower and typically larger than the L1 cache, and the
L3 cache is slower and typically larger than the L2 cache.

Prepared by: Tayachew Fikire Computer architecture & organization 28


Memory Hierarchy
 Design constraints on a computer’s memory can be summed up by three
questions:
 How much, how fast, how expensive

 There is a trade-off among capacity, access time, and cost


 Faster access time, greater cost per bit
 Greater capacity, smaller cost per bit
 Greater capacity, slower access time

 The way out of the memory dilemma is not to rely on a single memory
component or technology, but to employ a memory hierarchy

Prepared by: Tayachew Fikire Computer architecture & organization 29


Memory Hierarchy

Prepared by: Tayachew Fikire Computer architecture & organization 30


Memory Hierarchy
As one goes down the hierarchy, the
following occur:

a. Decreasing cost per bit

b. Increasing capacity

c. Increasing access time

d. Decreasing frequency of access of the


memory by the processor

Prepared by: Tayachew Fikire Computer architecture & organization 31


Part 2

External Memory

Prepared by: Tayachew Fikire Computer architecture & organization 32


Categories Of Storage
• Magnetic
– Floppy disks
– Hard drives
• Optical
– CD-ROM
– DVD
• Solid state storage devices
– USB Key (a very common form of solid state storage)

Prepared by: Tayachew Fikire Computer architecture & organization 33


Prepared by: Tayachew Fikire Computer architecture & organization 34
Magnetic Disk

 A disk is a circular platter constructed of nonmagnetic material,


called the substrate, coated with a magnetisable material
 Traditionally the substrate has been an aluminium or aluminium alloy
material
 Recently glass substrates have been introduced

 Benefits of the glass substrate:


 Improvement in the uniformity of the magnetic film surface to increase
disk reliability
 A significant reduction in overall surface defects to help reduce read-
write errors
 Ability to support lower fly heights
 Better stiffness to reduce disk dynamics
 Greater ability to withstand shock and damage

Prepared by: Tayachew Fikire Computer architecture & organization 35


Magnetic Disk

Prepared by: Tayachew Fikire Computer architecture & organization 36


Magnetic Disk

Prepared by: Tayachew Fikire Computer architecture & organization 37


Data are recorded on and later
retrieved from the disk via a
conducting coil named the head The write mechanism exploits
• In many systems there are two heads, a the fact that electricity flowing
read head and a write head through a coil produces a
• During a read or write operation the head magnetic field
is stationary while the platter rotates
beneath it
Magnetic
Read
Electric pulses are sent to the
The write head itself is made of and Write
easily magnetizable material
write head and the resulting Mechanisms
and is in the shape of a
magnetic patterns are recorded
rectangular doughnut with a gap
on the surface below, with
along one side and a few turns
different patterns for positive
of conducting wire along the
and negative currents
opposite side

An electric current in the wire


Reversing the direction of the
induces a magnetic field across
current reverses the direction of
the gap, which in turn
the magnetization on the
magnetizes a small area of the
recording medium
recording medium

Prepared by: Tayachew Fikire Computer architecture & organization 38


Inductive Write/Magnetoresistive Read Head

Prepared by: Tayachew Fikire Computer architecture & organization 39


• The head is a relatively small device capable of
reading from or writing to a portion of the
platter rotating beneath it. This gives rise to the
organization of data on the platter in a
concentric set of rings, called tracks . Each
track is the same width as the head.
• There are thousands of tracks per surface.
Figure depicts this data layout. Adjacent tracks
are separated by inter track gaps . This
prevents, or at least minimizes, errors due to
misalignment of the head or simply interference
of magnetic fields. Data are transferred to and
from the disk in sectors .
• There are typically hundreds of sectors per
track, and these may be of either fixed or
variable length. In most contemporary systems,
fixed-length sectors are used, with 512 bytes
being the nearly universal sector size. To avoid
imposing unreasonable precision requirements
on the system, adjacent sectors are separated by
inter sector gaps.

Disk data layout


Prepared by: Tayachew Fikire Computer architecture & organization 40
Characteristics
 Fixed-head disk  Removable disk
 One read-write head per  Can be removed and replaced with
track
another disk
 Heads are mounted on a
fixed ridged arm that  Advantages:
extends across all tracks  Unlimited amounts of data are available
with a limited number of disk systems
 Movable-head disk
 One read-write head  A disk may be moved from one computer
system to another
 Head is mounted on an arm
 The arm can be extended  Floppy disks and ZIP cartridge disks are
or retracted examples of removable disks
 Non-removable disk
 Permanently mounted in the  Double sided disk
disk drive  Magnetizable coating is applied to
 The hard disk in a personal both sides of the platter
computer is a non-removable
disk

Prepared by: Tayachew Fikire Computer architecture & organization 41


The head mechanism provides a
Disk
classification of disks into three
types
Classification
 The head must generate or sense
an electromagnetic field of Winchester Heads
sufficient magnitude to write and
read properly  Used in sealed drive assemblies that
are almost free of contaminants
 The narrower the head, the closer it
must be to the platter surface to  Designed to operate closer to the
function disk’s surface than conventional rigid
disk heads, thus allowing greater
 A narrower head means narrower data density
tracks and therefore greater data
density  Is actually an aerodynamic foil that
rests lightly on the platter’s surface
when the disk is motionless
 The closer the head is to the disk the
 The air pressure generated by a
greater the risk of error from
spinning disk is enough to make
impurities or imperfections the foil rise above the surface

Prepared by: Tayachew Fikire Computer architecture & organization 42


Disk Performance Parameters

 When the disk drive is operating the disk is rotating at constant speed.

 To read or write the head must be positioned at the desired track and at
the beginning of the desired sector on the track

 Track selection involves moving the head in a movable-head system or


electronically selecting one head on a fixed-head system

 Once the track is selected, the disk controller waits until the
appropriate sector rotates to line up with the head

Prepared by: Tayachew Fikire Computer architecture & organization 43


Disk Performance Parameters

 Seek time
 On a movable–head system, the time it takes to position the head at the track

 Rotational delay (rotational latency)


 The time it takes for the beginning of the sector to reach the head

 Access time
 The sum of the seek time and the rotational delay
 The time it takes to get into position to read or write

 Transfer time
 Once the head is in position, the read or write operation is then performed as the
sector moves under the head
 This is the data transfer portion of the operation

Prepared by: Tayachew Fikire Computer architecture & organization 44


SSD Compared to HDD
 SSDs have the following advantages over HDDs:

 High-performance input/output operations per second


(IOPS)

 Durability

 Longer lifespan

 Lower power consumption

 Quieter and cooler running capabilities

 Lower access times and latency rates

Prepared by: Tayachew Fikire Computer architecture & organization 45


Prepared by: Tayachew Fikire Computer architecture & organization 46
CD
Compact Disk. A nonerasable disk that stores digitized audio information. The standard
system uses 12-cm disks and can record more than 60 minutes of uninterrupted playing time.

CD-ROM
Compact Disk Read-Only Memory. A nonerasable disk used for storing computer data.
The standard system uses 12-cm disks and can hold more than 650 Mbytes.

CD-R

Optical
CD Recordable. Similar to a CD-ROM. The user can write to the disk only once.

CD-RW
CD Rewritable. Similar to a CD-ROM. The user can erase and rewrite to the disk
multiple times.
Disk
DVD Products
Digital Versatile Disk. A technology for producing digitized, compressed representation
of video information, as well as large volumes of other digital data. Both 8 and 12 cm diameters
are used, with a double-sided capacity of up to 17 Gbytes. The basic DVD is read-only (DVD-
ROM).

DVD-R
DVD Recordable. Similar to a DVD-ROM. The user can write to the disk only once.
Only one-sided disks can be used.

DVD-RW
DVD Rewritable. Similar to a DVD-ROM. The user can erase and rewrite to the disk
multiple times. Only one-sided disks can be used.

Blu-Ray DVD
High definition video disk. Provides considerably greater data storage density than DVD,
using a 405-nm (blue-violet) laser. A single layer on a single side can store 25 Gbytes.

Prepared by: Tayachew Fikire Computer architecture & organization 47

You might also like