Lecture06-Memory and Storage Systems
Lecture06-Memory and Storage Systems
1
Overview
• This Lecture
– Memory and Storage Systems
– Source: Chapters 4, 5, and 6 (10th edition)
• Next Lecture
– Input/ Output
2
Motivation
• In computing, memory refers to a device that is used
to store information
3
Classification of Physical Storage Media
• Performance parameters
• speed with which data can be accessed
• Cost per unit of data
• data loss on power failure or system crash
• According to Importance:
• Primary or Main Memory
• Secondary or Auxiliary Memory
5
Cache Memory in Computer
Organisation
6
Classification on Manufacturing
Substance
Physical Storage Media
• Cache – fastest and most costly form of storage;
volatile; managed by the computer system hardware.
• Main memory:
• fast access
• generally too small (or too expensive) to store the
entire database
• Volatile — contents of main memory are usually
lost if a power failure or system crash occurs.
Physical Storage Media (Cont.)
• Flash memory
• Data survives on power failure
• Data can be written at a location only once, but
location can be erased and written to again
• Reads are roughly as fast as main memory
• But writes are slow (few microseconds), erase is
slower
• Cost per unit of storage roughly similar to main
memory
• Widely used in embedded devices such as digital
cameras, USB
• Analogous to EEPROM (Electrically Erasable
Programmable Read-Only Memory)
9
Physical Storage Media (Cont.)
• Magnetic-disk
• Data is stored on spinning disk, and read/written
magnetically
• Primary medium for the long-term storage of data
• Data must be moved from disk to main memory for
access, and written back for storage
• direct-access – possible to read data on disk in any
order, unlike magnetic tape
• Survives power failures and system crashes
• disk failure can destroy data, but is rare
10
Physical Storage Media (Cont.)
• Optical storage
• non-volatile, data is read optically from a spinning disk
using a laser
• CD-ROM (640 MB) and DVD (4.7 to 17 GB) most popular
forms
• Write-one, read-many (WORM) optical disks used for
archival storage (CD-R, DVD-R, DVD+R)
• Multiple write versions also available (CD-RW, DVD-RW,
DVD+RW, and DVD-RAM)
• Reads and writes are slower than with magnetic disk
11
Physical Storage Media (Cont.)
• Tape storage
• non-volatile, used primarily for backup (to recover
from disk failure), and for archival data
• sequential-access – much slower than disk
• tape can be removed from drive -> storage costs
much cheaper than disk
• very high capacity
• Tape jukeboxes available for storing massive amounts
of data
• hundreds of terabytes (1 terabyte = 109 bytes) to even a
petabyte (1 petabyte = 1012 bytes)
12
Storage Devices
20
Sequential vs. Random Access Storage
• Sequential – Storage devices that read and write data in a serial (one after
the other) fashion
• Random-Access – Storage devices that read and write data without going
through a sequence of locations
14
Storage Technologies: Magnetic and Optical
• Magnetic – Storage devices use disks or tapes that are coated with
magnetically sensitive material
• Optical – Storage devices that use laser beams to read patterns etched into
plastic disks
15
Storage Hierarchy
16
Storage Hierarchy
• Primary storage: Fastest media but volatile (cache, main
memory).
17
Storage Capacity and Speed
Principle: the closer the memory is to the CPU, the faster it is.
19
Classification- Big picture
30
Storage Capacity
• Every memory device has a storage capacity, indicating
the number of bytes it can hold
21
Storage Capacity
22
Memory
23
Storage information
24
Storage Information
RAM (Random Access Memory)
Two categories:
•DRAM(Dynamic RAM)
•SRAM(Static RAM)
ROM (Read Only Memory)
• Store start-up instructions for a computer, also known as the
firmware.
• Different types
• Mask ROM
• Mask ROM is programmed during the manufacturing process
• PROM
• Programmed after manufacturing (One time programmed)
• EPROM
• Erasable PROM (Multiple time programmed)
• EEPROM
• Use of an electrical signal, in place of ultraviolet light to erase
• Flash ROM
• It is an enhanced version of EEPROM (faster erase)
Address Space
Word
• Data are transferred to and from memory in groups of bits called
words.
• The number of bits that can be stored in one CPU register in a
computer.
•Although programmers use a name to identify a word, at the hardware
level, each word is identified by an address.
•Address space
• The total number of uniquely identifiable locations in memory.
• For example: a memory with 64KB and a word size of 1 byte has
an address space that range from 0 to 65,535 (64*1024-1).
Address Space
Example 1
A computer has 32 MB of memory. How many bits are
needed to address any single byte in memory?
Solution
The memory address space is 32 MB or 32*1024 KB or
32*1024*1024 B = 25*210*210 B = 225 B. This means you
need Log2 225 or 25 bits, to address each byte.
Address Space
Example 2
A computer has 128 MB of memory. Each word in this
computer is 8 bytes. How many bits are needed to
address any single word in memory?
Solution
The memory address space is 128 MB, which means
227 B. However, each word is 8 bytes or (23) bytes,
which means that you have 224 words. This means you
need Log2 224 or 24 bits, to address each word.
The Future: Cloud Storage
• Provides access to storage across a network
• Accessed over the Internet or a WAN to remote data center