Escolar Documentos
Profissional Documentos
Cultura Documentos
Budditha Hettige
Department of Statistics and Computer Science University of Sri Jayewardenepura
Secondary Memory
Budditha Hettige
Technologies
Magnetic storage
Floppy, Zip disk, Hard drives, Tapes
Optical storage
CD, DVD, Blue-Ray, HD-DVD
Budditha Hettige
Magnetic Disk
Purpose:
Long term, nonvolatile storage Large, inexpensive, and slow Lowest level in the memory hierarchy
Budditha Hettige
Disk Track
Budditha Hettige
Components of a Disk
The arm assembly is moved in or out to position a head on a desired track. Tracks under heads make a cylinder (imaginary!). Only one head reads/writes at any one time. Block size is a multiple of sector size (which is often fixed).
Disk head Spindle Tracks
Sector
Arm movement
Platters
Arm assembly
Budditha Hettige
Internal Hard-Disk
Page 223
Budditha Hettige
Magnetic Disk
A stack of platters, a surface with a magnetic coating Typical numbers (depending on the disk size):
500 to 2,000 tracks per surface 32 to 128 sectors per track
A sector is the smallest unit that can be read or written Traditionally all tracks have the same number of sectors: Constant bit density: record more sectors on the outer tracks
Budditha Hettige
Budditha Hettige
10
Disk Access Time = Seek time + Rotational Latency + Transfer time + Controller Time + Queueing Delay
Budditha Hettige
11
12
Example
Setup parameters:
16383 Cycliders, 63 sectors per track, 3 platters, 6 heads
Bytes per sector: 512 RPM: 7200 Transfer mode: 66.6MB/s Average Read Seek time: 9.0ms (read), 9.5ms (write) Average latency: 4.17ms Physical dimension: 1 x 4 x 5.75 Interleave: 1:1
Budditha Hettige
13
Disk performance
Preamble: allows head to be synchronized before read/write ECC (Error Correction Code): corrects errors Unformatted capacity: preambles, ECCs and inter sector gaps are counted as data Disk performance depends on
seek time time to move arm to desired track rotational latency time needed for requested sector to rotate under head
Rotational speed: 5400, 7200, 10000, 15000 rpm
Transfer time time needed to transfer a block of bits under head (e.g., 40 MB/s)
Budditha Hettige
14
Disk performance
Disk controller
chip that controls the drive. Its tasks include accepting commands (READ, WRITE, FORMAT) from software, controlling arm motion, detecting and correcting errors
Controller time
overhead the disk controller imposes in performing an I/O access
Avg. disk access time = avg. seek time + avg. rotational delay +
Transfer time + controller overhead
Budditha Hettige
15
Example
Advertised average seek time of a disk is 5 ms, transfer rate is 40 MB per second, and it rotates at 10,000 rpm Controller overhead is 0.1 ms. Calculate the average time to read a 512byte sector.
Budditha Hettige
16
A disk organization used to improve performance of storage systems An array of disks controlled by a controller (RAID Controller) Data are distributed over disks (striping) to allow parallel operation
Budditha Hettige
17
RAID 0- No redundancy
No redundancy to tolerate disk failure Each strip has k sectors (say)
Strip 0: sectors 0 to k1 Strip 1: sectors k to 2k1 ...etc
Works well with large accesses Less reliable than having a single large disk
Budditha Hettige
18
Example (RAID 0)
Suppose that RAID consists of 4 disks with MTTF (mean time to failure) of 20,000 hours.
A drive will fail once in every 5,000 hours A single large drive with MTTF of 20,000 hours is 4 times reliable
Budditha Hettige
19
RAID 1 (Mirroring)
Uses twice as many disk as does RAID 0 (first half: primary, next half: backup) Duplicates all disks
On a write, every strip is written twice Excellent fault tolerance (if a disk fails, backup copy is used) Requires more disks
Budditha Hettige
20
Parity contains sum of all data in other disks If a disk fails, subtract all data in good disks from parity disk
Budditha Hettige
21
Budditha Hettige
22
Budditha Hettige
23
Budditha Hettige
24
Pit = a little depression, forming a lower level in the track Land = the flat part between pits, or the upper levels in the track Reading a CD is done by shining a laser at the disc and detecting changing reflections patterns.
1 = change in height (land to pit or pit to land) 0 = a fixed amount of time between 1s
Budditha Hettige
25
Organization of data
LAND PIT LAND PIT LAND
...------+ +-------------+ +---... |_____| |_______| ..0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 ..
Cannot have two 1s in a row! => uses Eight to Fourteen Modulation (EFM) encoding table. 0's are represented by the length of time between transitions, we must travel at constant linear velocity (CLV)on the tracks. Sectors are organized along a spiral Sectors have same linear length Advantage: takes advantage of all storage space available. Disadvantage: has to change rotational speed when seeking (slower towards the outside)
Budditha Hettige
26
CD-ROM
Addressing
1 second of play time is divided up into 75 sectors. Each sector holds 2KB 60 min CD: 60min * 60 sec/min * 75 sectors/sec = 270,000 sectors = 540,000 KB ~ 540 MB A sector is addressed by: Minute:Second:Sector e.g. 16:22:34
Type of laser
CD: 780nm (infrared) DVD: 635nm or 650nm (visible red) HD-DVD/Blu-ray Disc: 405nm (visible blue)
Capacity
CD: 650 MB, 700 MB DVD: 4.7 GB per layer, up to 2 layers HD-DVD: 15 GB per layer, up to 3 layers BD: 25 GB per layer, up to 2 layers
Budditha Hettige
27
Budditha Hettige
28
29
Performance
Acces time: 10X faster than hard drive Transfer rate
1x=150 kb/sec, up to 100X for memory cards Similar to normal hard drive for SSD ( 100-150 MB/sec)
30
Capacity
Memory cards: up to 32 GB USB flash drives: up to 32 GB Solid State Drives: up to 256 GB
Budditha Hettige
31
Challenges
Increasing size Improving writing limits
Budditha Hettige
32