COA Lecture 9
COA Lecture 9
Lecture 9
The memory is that part of the computer
where programs and data are stored.
Without a memory from which the processors can read
and write information, there would be no stored-program
digital computers.
Bit:
Smallest unit for computer memory
Byte
Definition basic storage unit
Word:
a group of 16 bits
A word refers to the basic data size or bit size that can be
processed by the arithmetic and logic unit of the
processor.
Also refers to the size of internal ALU registers
3
Computer Terabyte 1 terabyte (TB) 10244= 240 Tera represents a trillion, therefore, 1TB =
1024×1024×1024×1024 = 10244 = 1.1×1012
Memory
Hierarchy
This Memory Hierarchy Design is divided into 2 main
types:
Concept of External Memory or Secondary Memory Comprising
of Magnetic Disk, Optical Disk, Magnetic Tape i.e.
Hierarchical peripheral storage devices which are accessible by the
Memory processor via I/O Module.
Internal Memory or Primary Memory Comprising of
Organization Main Memory, Cache Memory & CPU registers. Directly
accessible by the processor.
Memory
Hierarchy
Memory
Hierarchy
If the memory type is closer to the CPU, the faster the
CPU can access the instructions and execute them, the
smaller and more expensive it is
Memory
Hierarchy
Capacity: As we move from top to bottom in the Hierarchy, the
capacity increases.
Access Time: It is the time interval between the read/write
request and the availability of the data. As we move from top to
bottom in the Hierarchy, the access time increases.
Performance: Earlier when the computer system was designed
without Memory Hierarchy design, the speed gap increases
Characteristics between the CPU registers and Main Memory due to large
difference in access time. This results in lower performance of the
of Memory system and thus, enhancement was required. This enhancement
was made in the form of Memory Hierarchy Design because of
Hierarchy which the performance of the system increases. One of the most
significant ways to increase system performance is minimizing
how far down the memory hierarchy one has to go to manipulate
data.
Cost per bit: As we move from bottom to top in the Hierarchy, the
cost per bit increases i.e. Internal Memory is costlier than External
Memory
Semiconductor memory
Main memory for storing instructions and data during
program execution
Data is stored and read many times to and from this type of
memory.
RAM size is measured in Gigabytes
RAM- Random Typical computers might have the following RAM size
Rasberry Pi 512 MB
Access Memory Smart phone 2 GB
Laptop 4GB
RAM can be byte or word addressable i.e. each RAM
location can hold a single byte or two bytes of information
8086 is byte addressable i.e. the word size is 8 bits
Each memory location has a unique address
Block Diagram
for a typical
RAM Chip
CS1 – Chip Select 1
CS2 – Chip Select 2
RD- Read
WR – Write
RAM Chip AD7- 7- bit address
Number of memory addresses = 27 = 128
The word size is the number of bits the CPU can
manipulate at once
Word Size A 32-bit bit machine can process 32-bits using one
single machine code instruction.
Random access memory (RAM)
Memory Sequential access memory (SAM)
Classification
Direct access memory (DAM)
Contents addressable memory (CAM)
Data access time is
independent to the physical
location
Random access memories are
RAM further classified as
Read-Write memories
(RAM)
Read only memories (ROM)
Form of semiconductor memory used in
PCs and workstations as main memory for
the computer
Each one-bit memory cell uses a
capacitor for data storage
Capacitor charge state indicates stored
value
DRAM Whether the capacitor is charged or
discharged indicates storage of 1 or 0
Capacitors do not hold charge indefinitely
Capacitors leak there is need for refresh
the contents of memory periodically
every few seconds (Volatile)
Need for refresh circuits
SDRAM: Synchronous DRAM.
semiconductor memory faster than conventional
DRAM.
It is synchronised to the clock of the processor and is
capable of keeping two sets of memory addresses open
SDRAM simultaneously. By transferring data alternately from
one set of addresses, and then the other, SDRAM cuts
down on the delays associated with non-synchronous
RAM, which must close one address bank before
opening the next.
Type of semiconductor memory
One bit memory cells use bi-stable
memory latches/flip flops for data storage
Two cross coupled inverters store a
single bit
4 transistors for storage
SRAM 2 transistors for access
No need of refresh circuits
supports faster read and write times than
DRAM (typically 10 ns against 60 ns for
DRAM)
Is normally used for caches
CAPACITOR
Capacitor Versus
Transistor
TRANSISTOR
Parameter SRAM DRAM
Location Located between main memory and CPU Found on the motherboard
external to CPU
Speed Faster because it is on chip memory. Access Slower it is off chip memory
time is less than main memory
Capacity Smaller capacity typically 1MB-16MB Higher capacity (1GB-
16GB)
Cost Expensive Cheap
Application For cache memory (L2 and L3 units) For main memory (DDR#)
Other types of
RAM
Cheaper variant of EEPROM
Blocks of bytes are erased at the same time
Data can be written to it and it can be erased only in blocks,
data can be read on an individual cell basis.
To erase and re-programme areas of the chip,
programming voltages at levels that are available within
electronic equipment are used.
It is non-volatile, and this makes it particularly useful.
FLASH MEMORY Flash memory is widely used in many applications
including memory cards for digital cameras, mobile
phones, computer memory sticks and many other
applications
Limited number of write cycles
Cheaper than SDRAM, more expensive than disk
Slower than SRAM, faster than disk
Volatile temporary memory on a storage device
Created when a computer is running many processes at
once and RAM is low
Virtual Memory
The OS makes part of the storage drive available to use
as RAM
Memories consist of a number of cells (or locations)
each of which can store a piece of information.