06 External Memory
06 External Memory
External Memory
William Stallings
Computer Organization
and Architecture
10th Edition
1
Types of External Memory
Magnetic Disk
– HardDisk
– RAID (Redundant Array of Independent Disks)
– Removable (Floppy Disk, Zip)
Optical
– CD-ROM
– CD-Recordable (CD-R)
– CD-R/W
– DVD
– Blu-Ray
– HD-DVD
Magnetic Tape
Flash Drive
2
Magnetic Disk
3
Magnetic Disk
4
Inductive Write MR Read
7
Data Organization and Formatting
9
Disk Data Layout - Tracks
10
Disk Data Layout - Tracks
Sectors
Inter Track
Gaps
Tracks
11
Disk Velocity
Bit near centre of rotating disk passes fixed point slower than bit on outside of disk
Increase spacing between bits in different tracks
Rotate disk at constant angular velocity (CAV)
– Gives pie shaped sectors and concentric tracks
– Individual tracks and sectors addressable
– Move head to given track and wait for given sector
– Waste of space on outer tracks
Lower data density
Can use zones to increase capacity
– Each zone has fixed bits per track
– More complex circuitry
13
Disk Layout Methods Diagram
14
Finding Sectors
15
Winchester Disk Format
Seagate ST506
16
Characteristics
17
1. Fixed/Movable Head Disk
Fixed head
– One read write head per track
– Heads mounted on fixed ridged arm
Movable head
– One read write head per side
– Mounted on a movable arm
18
2. Removable or Not
Removable disk
– Can be removed from drive and replaced with another disk
– Provides unlimited storage capacity
– Easy data transfer between systems
Nonremovable disk
– Permanently mounted in the drive
19
3. Single or Double Sided
20
4. Multiple Platters
22
Tracks and Cylinders
24
Tracks and Cylinders
26
5. Head mechanism
Contact (Floppy)
Fixed gap
Flying (Winchester)
– Head must generate or sense an EM field of sufficient magnitude to write and
read properly.
– The narrower the head, the closer it must be to the platter
– Narrower head = narrower tracks = greater data density
– Closer the head, greater the risk of error from impurities/imperfections
Cont
27
5. Head mechanism
Flying (Winchester Hard Disk)
28
Winchester Hard Disk (2)
Universal
Cheap
Fastest external storage
Getting larger all the time
30
Disk Performance Parameters
32
Disk Performance Parameters
Seek time
– Moving head to correct track
Rotational delay (latency)
– Waiting for data to rotate under head
Access time = Seek + Latency
– Time taken by the head to get into read/write position
Transfer rate
33
Timing of Disk I/O Transfer
34
Disk Performance Parameters
Seek time
Consists of
– Initial start up time
– Traversal time: Time taken to traverse the track
Traversal time consists of
– Traversal time
– Settling time (of the head)
Typical average seek time for contemporary hard disks is
10ms
35
Disk Performance Parameters
Rotational Delay
With 15000 rpm hard disk, One revolution will take …
– 4ms
Thus on average, the rotational delay = 2ms
36
SOLID STATE DRIVES
38
SOLID STATE DRIVES (SSD)
39
SSD Compared to HDD
SSDs have the following advantages over HDDs:
High-performance input/output operations per second (IOPS):
– Significantly increases performance I/O subsystems.
Durability:
– Less susceptible to physical shock and vibration.
Longer lifespan:
– SSDs are not susceptible to mechanical wear.
Lower power consumption:
– SSDs use considerably less power than comparable-size HDDs.
Quieter and cooler running capabilities:
– Less space required, lower energy costs, and a greener enterprise.
Lower access times and latency rates:
– Over 10 times faster than the spinning disks in an HDD.
40
Comparison of Solid State Drives and Disk
Drives
NAND Flash Drives Seagate Laptop Internal HDD
File copy/write speed 200–550 Mbps 50–120 Mbps
Less power draw, averages 2–3 More power draw, averages 6–
watts, resulting in 30+ minute 7 watts and therefore uses
Power draw/battery life battery boost more battery
Typically not larger than 512 Typically around 500 GB and 2
GB for notebook size drives, 1 TB max for notebook size
Storage capacity TB max for desktops drives; 4 TB max for desktops
Approx. $0.50 per GB for a 1- Approx. $0.15 per GB for a 4-TB
Cost TB drive drive
41
SSD Organization
Figure (next slide) illustrates a general view of the common architectural
system component associated with any SSD system.
On the host system, the operating system invokes file system software to
access data on the disk.
The file system, in turn, invokes I/O driver software.
The I/O driver software provides host access to the particular SSD
product.
The interface component in Figure (next slide) refers to the physical and
electrical interface between the host processor and the SSD peripheral
device.
If the device is an internal hard drive, a common interface is PCIe. For
external devices, one common interface is USB
43
Host System
SSD
Interface Operating System
Software
Controller
File System Software
Addressing
I/O driver Software
Flash Memory
Components
Flash Memory
Components
46
SSD - Practical Issues
First Issue:
SSD performance has a tendency to slow down as the device is used.
– To understand the reason for this, you need to know that files are stored on
disk as a set of pages, typically 4 KB in length.
– These pages are not necessarily, and indeed not typically, stored as a
contiguous set of pages on the disk.
(The reason for this arrangement is explained in the discussion of virtual memory in OS
Course.)
– However, flash memory is accessed in blocks, with a typical block size of 512
KB, so that there are typically 128 pages per block.
– Now consider what must be done to write a page onto a flash memory.
– Continue
47
SSD - Practical Issues
1. The entire block must be read from the flash memory and
placed in a RAM buffer. Then the appropriate page in the
RAM buffer is updated.
2. Before the block can be written back to flash memory, the
entire block of flash memory must be erased—it is not
possible to erase just one page of the flash memory.
3. The entire block from the buffer is now written back to the
flash memory
Continue
48
SSD - Practical Issues
Now, when a flash drive is relatively empty and a new file is created, the pages of that file
are written on to the drive contiguously, so that one or only a few blocks are affected.
However, over time, because of the way virtual memory works, files become fragmented,
with pages scattered over multiple blocks.
As the drive become more occupied, there is more fragmentation, so the writing of a new
file can affect multiple blocks.
Thus, the writing of multiple pages from one block becomes slower, the more fully
occupied the disk is.
49
SSD - Practical Issues
A second practical issue with flash memory drives is that a flash memory becomes
unusable after a certain number of writes.
As flash cells are stressed, they lose their ability to record and retain values.
A typical limit is 100,000 writes.
Techniques for prolonging the life of an SSD drive include
– front- ending the flash with a cache to delay and group write operations,
– using wear- leveling algorithms that evenly distribute writes across block of cells, and
– sophisticated bad-block management techniques.
In addition, vendors are deploying SSDs in RAID configurations to further reduce the
probability of data loss.
Most flash devices are also capable of estimating their own remaining lifetimes so systems
can anticipate failure and take preemptive action.
50