Chapter 2 Chapter 2
Secondary Storage and y g System Software y
References:
1. M. J. Folk and B. Zoellick, File Structures, Addison-Wesley., , y
목차 목차
Disks
S i h
Storage as a Hierarchy
Buffer Management Flash Memory
Flash Memory
1. Disks . s s
특징
i d i ( S )
Direct access storage devices (DASD)
serial devices (magnetic tape) Hard disk Floppy disk Optical disk
Hard disk, Floppy disk, Optical disk
1.1 Disk의 구성 1.1 Disk의 구성
Platters Spindle Read /write heads Boom
Hard Disk Drive 3D Visualization
(http://www youtube com/watch?NR=1&v=Bh80aay (http://www.youtube.com/watch?NR=1&v=Bh80aay gIXg&feature=endscreen)
Video of opened hard drive Video of opened hard drive
performing several operations.
(h // b / h? 9 MWG3f iEU)
(http://www.youtube.com/watch?v=9eMWG3fwiEU)
디스크의 표면
Tracks Sectors
디 의 면
Sectors
Gaps
Zoned Bit Recording (ZBR) o ed t eco d g ( )
16 sectors/track
9 / k
9 sectors/track
Source: http://www.pcguide.com/ref/hdd/geom/tracksZBR-c.html
디스크 드라이브의 구성
디 라이 의 구성
판(platter)
헤드(head) 섹터(sector)
헤드(head)
트랙(track)
실린더
HDD Interface te ace
CPU와 HDD간의 인터페이스
( d d h l h )
ATA (Advanced Technology Attachment)
ATA-1: 최초의 규격, PIO 지원
ATA 7: UDMA6(Ultra DMA 133) 추가
ATA-7: UDMA6(Ultra DMA 133) 추가
Serial ATA (SATA1): 전송속도= 150MB/sec
SATA2: 전송속도 = 300MB/sec
SATA2: 전송속도 300MB/sec
SATA3: 전송속도 = 600MB/sec
USB2.0: 전송속도 = 480Mbps = 60MB/sec
IEEE1394a: 전송속도 = 400Mbps = 50MB/sec
기타 표준들: USB3.0(4Gbps = 400MB/sec), SCSI, SAS, …
최신 HDD 사양 – 예 최신 HDD 사양 예
모델번호: Seagate ST3000DM001 저장 용량 3
저장 용량: 3TB
크기: 3.5" (Desktop HDD)
인터페이스: SATA 3 0 6Gb/s 600 MB/s
인터페이스: SATA 3.0 – 6Gb/s – 600 MB/s
회전 속도: 7200 RPM
캐쉬 메모리: 64MB
캐쉬 메모리: 64MB
헤드/디스크: 6/3
섹터당 바이트 수: 4,096,
탐색시간, 평균 읽기(ms): < 8.5
탐색시간, 평균 쓰기(ms): < 9.5
평균 데이터 전송 속도: 156 MB/s (최대 = 210 MB/s)
참조: http://www seagate com/files/www-content/product-content/barracuda-fam/desktop-
참조: http://www.seagate.com/files/www content/product content/barracuda fam/desktop hdd/barracuda-7200-14/ko/docs/barracuda-desktop-hdd-ds-1770-1-1212kr.pdf
1.2 저장용량 1.2 저장용량
디스크의 저장용량
T k 용량 / k b /
Track 용량 = sectors/track bytes/sector
Cylinder 용량 = tracks/cylinder track 용량 Drive 용량 = # of cylinders cylinder 용량
Drive 용량 = # of cylinders cylinder 용량
Example
Example
File Size : 20,000 record
Number of bytes per sector = 512 Number of bytes per sector 512 Number of sectors per track = 40 Number of tracks per cylinder = 11p y Number of cylinders = 1,331
Example a p e
Data record 가 256byte일 경우, 필요한 cylinder 수
각 당 저장할 수 있는 d 수 2
각 sector 당 저장할 수 있는 record 수 : 2
필요한 전체 sector 수 : 20,000/2 = 10,000 cylinder 당 sector 수 : 40 11 = 440
cylinder 당 sector 수 : 40 11 = 440
필요한 cylinder 수 : 10,000/440 = 22.7
☞ 각 cylinder 들이 인접한 곳에 저장될 필요는 없다.
File Size : 20 000 record File Size : 20,000 record
Number of bytes per sector = 512 Number of sectors per track = 40p Number of tracks per cylinder = 11 Number of cylinders = 1,331
Hard drive capacity over time a d d ve capac ty ove t e
1.3 Clusters .3 C uste s
정의 – Fixed number of contiguous sectors 장점
장점
Reduce seek time
File allocation table (FAT) 관리 용이
File allocation table (FAT) 관리 용이
Cluster 의 크기에 따른 장단점?
A: track B: sector
구분 장점 단점
A: track, B: sector
C: track sector, D: cluster
구분 장점 단점
Cluster 크기가 작을 때 버려지는 용량이 적다 FAT 크기가 커진다 Cluster 크기가 클 때 FAT 크기가 작다
순차 처리에 적합 버려지는 용량이 크다
File allocation table (FAT)
Cluster Cluster number location
1
2 3
The Part of the
FAT pertaining
to our file
to our file
1
2
3
2
FIGURE 3 5 The file manager FIGURE 3.5 The file manager
determines which cluster in the file has the sector that is to be accessed.
FAT32 3
Windows 95 OSR2, Windows 98, Windows ME에서 사용 32 bit cluster identifier (상위 4bit는 사용 안함 ) 28bit
32-bit cluster identifier (상위 4bit는 사용 안함.) 28bit
한 cluster의 최대 크기 = 32 KB
FAT32의 최대 volume 크기의 최대 기
32 KB/cluster * 228 clusters = 243 byte = 8 TB
But, 새로운 FAT32 volume의 크기는 32 GB로 제한.
Fil di t 에서 fil 의 크기를 32 bit로 표현
File directory에서 file의 크기를 32-bit로 표현
파일의 최대 크기 = 4 GB
Default Cluster Sizes for FAT32 VolumesDefault Cluster Sizes for FAT32 Volumes
Partition Size Cluster Size
32 MB 8 GB 4 KB
32 MB – 8 GB 4 KB
8 GB – 16 GB 8 KB
16 GB – 32 GB 16 KB
32 GB 32 KB
NTFS N S
Windows의 기본적인 파일 시스템 포맷
6 bi l id ifi
64-bit cluster identifier
이론적인 최대 volume 크기 = 16 EB (16 Billion GB) 실제 volume의 크기는 32bit 주소 체계를 따르도록
실제 volume의 크기는 32bit 주소 체계를 따르도록…
최대 크기: 64 KB/cluster * (232 – 1) clusters = 256 TB
한 volume당 232 – 1 개의 파일 저장 가능
한 volume당 2 1 개의 파일 저장 가능
한 파일의 최대 크기 = 16 TB
Default Cluster Sizes for NTFS Volumes
Partition Size Cluster Size
512 MB 이하 512 bytes
512 MB 이하 512 bytes
512 MB – 1 GB 1 KB
1 GB – 2 GB 2 KB
2 GB 이상 4 KB
Fragmentation ag e tat o
예: record size = 300 bytes, sector = 512 bytes
d / 구현 용이 l f
1 record /sector: 구현 용이, internal fragmentation
1.x record /sector: 단편화 , 여러 번의 I/O Cluster 크기에 따른 internal fragmentation
Cluster 크기에 따른 internal fragmentation