0% found this document useful (0 votes)
17 views39 pages

Understanding Memory and Storage Systems

Uploaded by

adolfhitlar1233
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views39 pages

Understanding Memory and Storage Systems

Uploaded by

adolfhitlar1233
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Memory and storage system

Motivation
2

 Data is stored on external storage devices and fetched


into main memory as needed for processing
 Page/Block is unit of information read from or written
to disk.

01-Nov-22
Classification of Physical Storage Media
3
 Based on
 speed with which data can be accessed
 Cost per unit of data

 Reliability
 data loss on power failure or system crash

 physical failure of the storage device

 Can differentiate storage into:


 volatile storage: loses contents when power is switched
off
 non-volatile storage:

 Contents persist even when power is switched off.


 Includes secondary and tertiary storage, as well as
battery- backed up main-memory.

01-Nov-22
Physical Storage Media
4

 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.

01-Nov-22
Physical Storage Media (Cont.)
5
 Flash memory
 Data survives 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
 Is a type of EEPROM (Electrically Erasable Programmable
Read-Only Memory)

01-Nov-22
Physical Storage Media (Cont.)
6
 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

01-Nov-22
Physical Storage Media (Cont.)
7

 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

01-Nov-22
Physical Storage Media (Cont.)
8
 Tape storage
 non-volatile, used primarily for backup (to recover from
disk failure), and for archival data
 sequential-access – much slower than disk
 very high capacity
 tape can be removed from drive  storage costs much
cheaper than disk, but drives are expensive
 Tape jukeboxes available for storing massive amounts of
data
 hundreds of terabytes (1 terabyte = 109 bytes) to even
a petabyte (1 petabyte = 1012 bytes)

01-Nov-22
Storage Hierarchy
9

Cost Cost
Speed
Speed

01-Nov-22
Storage Hierarchy (Cont.)
10

 primary storage: Fastest media but volatile (cache,


main memory).
 secondary storage: next level in hierarchy, non-volatile,
moderately fast access time
 also called on-line storage

 E.g. flash memory, magnetic disks

 Tertiary storage: lowest level in hierarchy, non-volatile,


slow access time
 also called off-line storage

 E.g. magnetic tape, optical storage

01-Nov-22
Storage Devices

 Storage devices are categorized by:


The method they use to access the information
The technology they use
Their location in the storage hierarchy
Their capacity and speed

01-Nov-22
Sequential vs. Random Access Storage

Tape Drive – Floppy Disk Drive – Hard Disk –


sequential storage random-access storage 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

01-Nov-22
Storage Technologies: Magnetic and Optical

Magnetic Storage Optical Storage –


CD/DVD drive

 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

01-Nov-22
The Storage Hierarchy

 The three levels of storage hierarchy are:


 Online storage – Also called primary storage,

 Near-online storage – Also called secondary storage,

 Offline storage – Also called tertiary storage or


archival storage. Devices such as tape backup units store
data for archival purposes.

01-Nov-22
Storage Capacity and Speed
Floppy Disk Hard Drive CD ROM / DVD

Capacity – 720 KB to Capacity – Up to 80 GB Capacity – CD-ROM 650


1.44 MB MB; DVD 17 GB
Access Time – 6 to 12ms
Access Time – 100ms Access Time – 80 to 800ms

 A storage device’s performance is measured by:


 Capacity – The number of bytes of data that a device can hold
 Access Time – The amount of time, in milliseconds (ms), it takes
the device to begin reading data

01-Nov-22
Thank You

30
Three levels of memory hierarchy
16

Principle: the closer the memory is to the CPU, the faster it is.

01-Nov-22
CLASSIFICATION- BIG PICTURE
Registers
2ns
17 Cache (I, II, III)
Volatile SRAM
DRAM
Primary SDRAM
(Semiconductor – RAM EDRAM
chip). Main Memory
EDO
FLASH RAM
Memory Types &
Storage Devices PROM
Non-volatile EPROM
ROM EEPROM
Tape
Magnetic memory HD, Zip Disk
Secondary FDD
(Devices)
Optical
CD-ROM, CD-R, CD-RW
Memory DVD-ROM, DVD-R 5ms
DVD- RW
Storage Capacity
18
 Every memory device has a storage capacity,
indicating the number of bytes it can hold
 Capacities are expressed in various units:

Unit Symbol Number of Bytes

kilobyte KB 210 = 1024


megabyte MB 220 (over 1 million)
gigabyte GB 230 (over 1 billion)
terabyte TB 240 (over 1 trillion)

01-Nov-22
Storage Capacity
19

[Link]. Unit Description

1 Kilobyte (KB) 1 KB = 1024 Bytes

2 Megabyte (MB) 1 MB = 1024 KB

3 GigaByte (GB) 1 GB = 1024 MB

4 TeraByte (TB 1 TB = 1024 GB

5 PetaByte (PB) 1 PB = 1024 TB

01-Nov-22
Storage Capacity
20

1024 KB kilobyte 210

10242 MB megabyte 220

10243 GB gigabyte 230

10244 TB Terabyte 240


Petabyte
10245 PB 250

10246 EB Exabyte 260


Zettabyte
10247 ZB 270

10248 YB Yottabyte 280

01-Nov-22
Storage Capacity
21

 Is there anything bigger than a Yottabyte?


 As of 2015, there are no approved standard sizes for anything
bigger than a Yottabyte. However, the two standards that have
been proposed are the Hellabyte or Brontobyte.
 How many 4MB MP3 files can be stored in a 20 GB
HDD?
 20*(1,024 / 4) =20* 256 4MB MP3 files.

01-Nov-22
Memory
22

9278
9279 Main memory is
9280 divided into many
9281 memory locations (or
9282 cells)
9283
9284 Each memory cell has a
9285 numeric address, which
9286 uniquely identifies it

01-Nov-22
Storing Information
23

Each memory cell stores a


9278 set number of bits
9279 10011010 (usually 8 bits, or one
9280 byte)
9281
9282 Large values are
9283 stored in consecutive
9284 memory locations
9285
9286

01-Nov-22
Storing Information

24 01-Nov-22
Memory Types
25

 RAM (Random Access Memory)


 Volatile and R/W by user
 Two categories:
 DRAM(Dynamic RAM)
 Need to refresh
 Slow and short life time
 Less power consumption, less size and less expensive

 SRAM(Static RAM)
 No refresh
 Faster more reliable
 more expensive
 often used only as a memory cache

01-Nov-22
Address Space
28

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 225 (25 x 220).
This means you need log2 225 or 25 bits, to address each
byte.
01-Nov-22
Address Space
29

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.
However, each word is 8 (23) bytes, which means that you
have 224 words. This means you need log2 224 or 24 bits, to
address each word.
01-Nov-22
Address Space
29

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.
However, each word is 8 (23) bytes, which means that you
have 224 words. This means you need log2 224 or 24 bits, to
address each word.
01-Nov-22
Magnetic Hard Disk Mechanism
30

NOTE: Diagram is schematic, and simplifies the structure of actual disk drives
01-Nov-22
Components of a Disk
Spindle
Tracks
Disk head

 The platters spin (say, 90rps).


 The arm assembly is Sector

moved in or out to position


a head on a desired track.
Tracks under heads make
a cylinder (imaginary!). Platters
Arm movement
 Only one head
reads/writes at any
one time.
Arm assembly
 Block size is a multiple
of sector size (which is fixed).
Top view
32

01-Nov-22
Top view
33

Track one

01-Nov-22
Top view
34

2 3

Sector one 1 4

8 5

7 6

01-Nov-22
Filesystems

• Files are managed within a “filesystem”

• The filesystem defines how and where files are stored


within a hard disk (or partition)

• Common filesystems include:


• FAT16 (MSDOS)
• VFAT (Windows 95)
• FAT32 (Windows 98)
• NTFS (Windows NT)
• UFS (UNIX)
• ext2/ext3 (Linux)
• ISO9660 (CD Roms)
35 01-Nov-22
Filesystems

• When a disk is formatted, a filesystem is placed on the disk

• The filesystem reserves space for the FAT.


• The remaining space is available for files

• When a file is to be saved into the filesystem, the system


looks for the best location to save the file
• It is usually best to save the file in contiguous blocks.
• If the disk is nearly full, it may not have enough
contiguous blocks to save the file. In that case, the
filesystem will place the file wherever it can find space.

36 01-Nov-22
37

A journey by byte

01-Nov-22
Open a Hard Disks

 Draw the scamatic diagram along with its


componentsof a HDD

Slide 38 01-Nov-22
39

Thank you

01-Nov-22

You might also like