Split View: [운영체제] 11. 대용량 저장장치 구조
[운영체제] 11. 대용량 저장장치 구조
대용량 저장장치 구조
운영체제에서 대용량 저장장치는 파일 시스템, 가상 메모리, 스왑 공간 등 다양한 목적으로 사용됩니다. 이 글에서는 HDD와 SSD의 물리적 구조, 디스크 스케줄링 알고리즘, RAID 구성, 그리고 현대적인 객체 스토리지와 클라우드 스토리지를 살펴봅니다.
1. HDD (Hard Disk Drive) 구조
HDD는 자기 디스크를 회전시키며 데이터를 읽고 쓰는 기계식 저장장치입니다.
물리적 구성 요소
┌─────────────────────────────────────┐
│ HDD 내부 구조 │
│ │
│ ┌───────────────────┐ │
│ │ Platter (원판) │ ← 자기 코팅 │
│ │ ┌─────────┐ │ │
│ │ │ Spindle │ │ ← 회전축 │
│ │ └─────────┘ │ │
│ └───────────────────┘ │
│ │
│ ─────── Actuator Arm ─────── │
│ ▼ │
│ Read/Write Head │
│ │
│ Track: 동심원 형태의 데이터 경로 │
│ Sector: Track의 세분화 단위 │
│ Cylinder: 같은 위치 Track의 집합 │
└─────────────────────────────────────┘
- 플래터(Platter): 자기 물질로 코팅된 원형 디스크
- 스핀들(Spindle): 플래터를 회전시키는 모터 (5,400 ~ 15,000 RPM)
- 읽기/쓰기 헤드: 플래터 표면의 자기 패턴을 읽거나 쓰는 장치
- 액추에이터 암(Actuator Arm): 헤드를 원하는 트랙으로 이동
디스크 접근 시간 구성
총 접근 시간 = 탐색 시간(Seek Time) + 회전 지연(Rotational Latency) + 전송 시간(Transfer Time)
| 구성 요소 | 설명 | 일반적 시간 |
|---|---|---|
| 탐색 시간 | 헤드를 목표 트랙으로 이동 | 3~12 ms |
| 회전 지연 | 목표 섹터가 헤드 아래로 회전 | 2~6 ms |
| 전송 시간 | 데이터를 실제로 읽거나 쓰기 | 수십 us |
2. 디스크 스케줄링 알고리즘
디스크 I/O 요청이 큐에 쌓이면, 어떤 순서로 처리할지가 성능에 큰 영향을 줍니다. 주요 목표는 탐색 시간(Seek Time)을 최소화하는 것입니다.
FCFS (First-Come, First-Served)
가장 단순한 방식으로, 요청이 도착한 순서대로 처리합니다.
요청 큐: 98, 183, 37, 122, 14, 124, 65, 67
헤드 시작 위치: 53
이동 순서: 53 → 98 → 183 → 37 → 122 → 14 → 124 → 65 → 67
총 헤드 이동: 640 실린더
SCAN (엘리베이터 알고리즘)
헤드가 한 방향으로 끝까지 이동하면서 요청을 처리한 후, 반대 방향으로 되돌아옵니다.
요청 큐: 98, 183, 37, 122, 14, 124, 65, 67
헤드 시작: 53, 방향: 증가
이동 순서: 53 → 65 → 67 → 98 → 122 → 124 → 183 → [199] → 37 → 14
끝까지 간 후 반전
C-SCAN (Circular SCAN)
한 방향으로만 서비스하고, 끝에 도달하면 반대쪽 끝으로 즉시 이동하여 다시 같은 방향으로 처리합니다. 대기 시간의 균일성을 높입니다.
요청 큐: 98, 183, 37, 122, 14, 124, 65, 67
헤드 시작: 53, 방향: 증가
이동 순서: 53 → 65 → 67 → 98 → 122 → 124 → 183 → [199] → [0] → 14 → 37
끝 → 처음으로 점프
스케줄링 비교표
| 알고리즘 | 장점 | 단점 |
|---|---|---|
| FCFS | 구현 간단, 공정 | 헤드 이동 많음 |
| SCAN | 효율적, 기아 없음 | 양 끝 요청 대기 불균등 |
| C-SCAN | 대기 시간 균일 | 한 방향만 서비스 |
| LOOK | SCAN 개선, 불필요한 이동 제거 | 구현 약간 복잡 |
C 언어로 SCAN 시뮬레이션
#include <stdio.h>
#include <stdlib.h>
int compare(const void *a, const void *b) {
return (*(int *)a - *(int *)b);
}
void scan(int requests[], int n, int head, int disk_size) {
int total_movement = 0;
int sorted[n + 1];
for (int i = 0; i < n; i++)
sorted[i] = requests[i];
sorted[n] = head;
qsort(sorted, n + 1, sizeof(int), compare);
int head_idx = 0;
for (int i = 0; i <= n; i++) {
if (sorted[i] == head) {
head_idx = i;
break;
}
}
// 오른쪽으로 이동
for (int i = head_idx; i <= n; i++) {
printf("서비스: %d\n", sorted[i]);
total_movement += abs(sorted[i] - head);
head = sorted[i];
}
// 디스크 끝까지 이동
total_movement += abs(disk_size - 1 - head);
head = disk_size - 1;
// 왼쪽으로 이동
for (int i = head_idx - 1; i >= 0; i--) {
printf("서비스: %d\n", sorted[i]);
total_movement += abs(sorted[i] - head);
head = sorted[i];
}
printf("총 헤드 이동: %d\n", total_movement);
}
int main() {
int requests[] = {98, 183, 37, 122, 14, 124, 65, 67};
int n = sizeof(requests) / sizeof(requests[0]);
scan(requests, n, 53, 200);
return 0;
}
3. NVM (Non-Volatile Memory) 장치 - SSD
SSD(Solid State Drive)는 NAND 플래시 메모리 기반의 저장장치로, HDD와 달리 기계적 부품이 없습니다.
SSD 내부 구조
┌──────────────────────────────────────┐
│ SSD 구조 │
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Channel 0│ │ Channel 1│ ... │
│ │ ┌──────┐ │ │ ┌──────┐ │ │
│ │ │Die 0 │ │ │ │Die 0 │ │ │
│ │ │┌────┐│ │ │ │┌────┐│ │ │
│ │ ││Blk ││ │ │ ││Blk ││ │ │
│ │ ││Page││ │ │ ││Page││ │ │
│ │ │└────┘│ │ │ │└────┘│ │ │
│ │ └──────┘ │ │ └──────┘ │ │
│ └──────────┘ └──────────┘ │
│ │
│ FTL (Flash Translation Layer) │
│ - 논리 주소 → 물리 주소 매핑 │
│ - Garbage Collection 관리 │
│ - Wear Leveling (마모 균등화) │
└──────────────────────────────────────┘
SSD vs HDD 비교
| 특성 | HDD | SSD |
|---|---|---|
| 읽기 속도 | ~200 MB/s | ~3,500 MB/s (NVMe) |
| 쓰기 속도 | ~150 MB/s | ~3,000 MB/s (NVMe) |
| 랜덤 I/O | 수백 IOPS | 수십만 IOPS |
| 지연 시간 | 수 ms | 수십 us |
| 내구성 | 기계적 마모 | 쓰기 횟수 제한 (TBW) |
| 가격/GB | 낮음 | 높음 |
NAND 플래시 특성
- 읽기: 페이지 단위 (4~16 KB)
- 쓰기: 페이지 단위 (빈 페이지에만 가능)
- 삭제: 블록 단위 (수백 페이지)
- 쓰기 증폭(Write Amplification): 실제 데이터보다 더 많은 물리적 쓰기 발생
4. RAID (Redundant Array of Independent Disks)
RAID는 여러 디스크를 조합하여 성능, 안정성, 또는 둘 다를 향상시키는 기술입니다.
RAID 수준별 구조
RAID 0 (스트라이핑)
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│ A1 │ │ A2 │ │ A3 │ │ A4 │
│ A5 │ │ A6 │ │ A7 │ │ A8 │
└─────┘ └─────┘ └─────┘ └─────┘
Disk 0 Disk 1 Disk 2 Disk 3
→ 성능 향상, 내결함성 없음
RAID 1 (미러링)
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│ A1 │ │ A1 │ │ A2 │ │ A2 │
│ A3 │ │ A3 │ │ A4 │ │ A4 │
└─────┘ └─────┘ └─────┘ └─────┘
Disk 0 Disk 1 Disk 2 Disk 3
→ 미러 복사, 높은 내결함성
RAID 5 (분산 패리티)
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│ A1 │ │ A2 │ │ A3 │ │ Ap │
│ B1 │ │ B2 │ │ Bp │ │ B3 │
│ C1 │ │ Cp │ │ C2 │ │ C3 │
│ Dp │ │ D1 │ │ D2 │ │ D3 │
└─────┘ └─────┘ └─────┘ └─────┘
Disk 0 Disk 1 Disk 2 Disk 3
→ 패리티 분산, 1개 디스크 장애 허용
RAID 6 (이중 패리티)
→ RAID 5 + 추가 패리티, 2개 디스크 장애 허용
RAID 수준 비교
| RAID | 최소 디스크 | 용량 효율 | 내결함성 | 읽기 성능 | 쓰기 성능 |
|---|---|---|---|---|---|
| 0 | 2 | 100% | 없음 | 매우 높음 | 매우 높음 |
| 1 | 2 | 50% | 1개 장애 | 높음 | 보통 |
| 5 | 3 | (N-1)/N | 1개 장애 | 높음 | 보통 |
| 6 | 4 | (N-2)/N | 2개 장애 | 높음 | 낮음 |
| 10 | 4 | 50% | 각 미러 1개 | 매우 높음 | 높음 |
5. 객체 스토리지 (Object Storage)
전통적인 블록 스토리지나 파일 시스템과 달리, 객체 스토리지는 데이터를 객체 단위로 관리합니다.
구조 비교
블록 스토리지: 파일 시스템: 객체 스토리지:
┌────┐ /home/ ┌──────────────────┐
│Blk1│ ├── user/ │ Object ID: abc123│
│Blk2│ │ └── file.txt │ Data: [binary] │
│Blk3│ └── etc/ │ Metadata: │
│Blk4│ └── config │ size: 1024 │
└────┘ │ type: image │
고정 크기 블록 계층적 디렉토리 │ created: ... │
└──────────────────┘
플랫 네임스페이스
객체 스토리지 특성
- 플랫 네임스페이스: 디렉토리 계층 없이 고유 ID로 접근
- 풍부한 메타데이터: 객체마다 사용자 정의 메타데이터 저장 가능
- HTTP REST API: GET, PUT, DELETE 같은 HTTP 메서드로 접근
- 대규모 확장성: 페타바이트 이상의 데이터 저장 가능
- 대표 서비스: Amazon S3, Google Cloud Storage, Azure Blob Storage
6. 클라우드 스토리지
클라우드 환경에서의 스토리지는 용도에 따라 여러 유형으로 나뉩니다.
클라우드 스토리지 유형
┌─────────────────────────────────────────────┐
│ 클라우드 스토리지 분류 │
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ 블록 │ │ 파일 │ │ 객체 │ │
│ │ 스토리지 │ │ 스토리지 │ │ 스토리지 │ │
│ │ │ │ │ │ │ │
│ │ EBS │ │ EFS │ │ S3 │ │
│ │ 고성능 │ │ 공유 접근 │ │ 대규모 │ │
│ │ 낮은 지연 │ │ NFS 호환 │ │ HTTP 접근 │ │
│ └───────────┘ └───────────┘ └───────────┘ │
│ │
│ ┌───────────────────────────────────────┐ │
│ │ 스토리지 티어: Hot → Warm → Cold │ │
│ │ 접근 빈도에 따른 비용 최적화 │ │
│ └───────────────────────────────────────┘ │
└─────────────────────────────────────────────┘
7. 정리
대용량 저장장치는 운영체제의 핵심 하부 시스템입니다.
- HDD: 기계식 장치로 탐색 시간이 성능 병목. 스케줄링 알고리즘(SCAN, C-SCAN 등)으로 최적화
- SSD: NAND 플래시 기반으로 랜덤 I/O 성능 우수. FTL, Wear Leveling, TRIM 등의 관리 필요
- RAID: 여러 디스크를 조합하여 성능과 안정성 확보. 수준에 따라 트레이드오프 상이
- 객체 스토리지: 비정형 대용량 데이터에 적합. REST API 기반 접근
- 클라우드 스토리지: 온디맨드 확장, 티어링을 통한 비용 최적화
퀴즈: 디스크 스케줄링과 RAID
Q1. SCAN 알고리즘과 C-SCAN 알고리즘의 차이점은 무엇인가요?
A1. SCAN은 헤드가 한쪽 끝에 도달하면 방향을 반전하여 양방향으로 서비스합니다. C-SCAN은 한 방향으로만 서비스하고, 끝에 도달하면 반대쪽 끝으로 즉시 이동합니다. C-SCAN은 대기 시간의 균일성이 더 좋습니다.
Q2. RAID 5에서 디스크 하나가 고장나면 어떻게 데이터를 복구하나요?
A2. RAID 5는 분산 패리티를 사용합니다. 고장난 디스크의 데이터는 나머지 디스크들의 데이터와 패리티 정보를 XOR 연산하여 복구할 수 있습니다. 단, 복구 중 추가 디스크 장애가 발생하면 데이터를 잃게 됩니다.
Q3. SSD에서 쓰기 증폭(Write Amplification)이란 무엇인가요?
A3. SSD는 쓰기 전에 블록 단위로 삭제해야 하므로, 유효 데이터를 다른 블록으로 복사한 후 삭제하는 과정에서 실제 사용자 데이터보다 더 많은 물리적 쓰기가 발생합니다. 이를 쓰기 증폭이라 하며, SSD 수명에 직접적으로 영향을 미칩니다.
[OS Concepts] 11. Mass-Storage Structure
Mass-Storage Structure
In operating systems, mass storage is used for a variety of purposes including file systems, virtual memory, and swap space. This article examines the physical structure of HDDs and SSDs, disk scheduling algorithms, RAID configurations, and modern object storage and cloud storage.
1. HDD (Hard Disk Drive) Structure
An HDD is a mechanical storage device that reads and writes data by spinning magnetic disks.
Physical Components
┌─────────────────────────────────────┐
│ HDD Internal Structure │
│ │
│ ┌───────────────────┐ │
│ │ Platter │ ← Magnetic│
│ │ ┌─────────┐ │ coating │
│ │ │ Spindle │ │ ← Rotation │
│ │ └─────────┘ │ axis │
│ └───────────────────┘ │
│ │
│ ─────── Actuator Arm ─────── │
│ ▼ │
│ Read/Write Head │
│ │
│ Track: Concentric data paths │
│ Sector: Subdivision of a track │
│ Cylinder: Set of tracks at same │
│ position across platters│
└─────────────────────────────────────┘
- Platter: A circular disk coated with magnetic material
- Spindle: A motor that spins the platters (5,400 to 15,000 RPM)
- Read/Write Head: A device that reads or writes magnetic patterns on the platter surface
- Actuator Arm: Moves the head to the desired track
Disk Access Time Components
Total Access Time = Seek Time + Rotational Latency + Transfer Time
| Component | Description | Typical Time |
|---|---|---|
| Seek Time | Moving the head to the target track | 3-12 ms |
| Rotational Latency | Waiting for the target sector to rotate | 2-6 ms |
| Transfer Time | Actually reading or writing data | Tens of us |
2. Disk Scheduling Algorithms
When disk I/O requests queue up, the order in which they are processed significantly affects performance. The primary goal is to minimize seek time.
FCFS (First-Come, First-Served)
The simplest approach, processing requests in the order they arrive.
Request queue: 98, 183, 37, 122, 14, 124, 65, 67
Head starting position: 53
Movement order: 53 → 98 → 183 → 37 → 122 → 14 → 124 → 65 → 67
Total head movement: 640 cylinders
SCAN (Elevator Algorithm)
The head moves in one direction to the end, servicing requests along the way, then reverses direction.
Request queue: 98, 183, 37, 122, 14, 124, 65, 67
Head start: 53, Direction: increasing
Movement order: 53 → 65 → 67 → 98 → 122 → 124 → 183 → [199] → 37 → 14
Reverses after reaching the end
C-SCAN (Circular SCAN)
Services requests in only one direction, and when it reaches the end, immediately jumps to the opposite end to resume servicing in the same direction. This improves uniformity of wait times.
Request queue: 98, 183, 37, 122, 14, 124, 65, 67
Head start: 53, Direction: increasing
Movement order: 53 → 65 → 67 → 98 → 122 → 124 → 183 → [199] → [0] → 14 → 37
End → jump to beginning
Scheduling Comparison Table
| Algorithm | Advantages | Disadvantages |
|---|---|---|
| FCFS | Simple implementation, fair | High head movement |
| SCAN | Efficient, no starvation | Uneven wait at both ends |
| C-SCAN | Uniform wait times | Services only one direction |
| LOOK | Improved SCAN, eliminates unnecessary movement | Slightly complex implementation |
SCAN Simulation in C
#include <stdio.h>
#include <stdlib.h>
int compare(const void *a, const void *b) {
return (*(int *)a - *(int *)b);
}
void scan(int requests[], int n, int head, int disk_size) {
int total_movement = 0;
int sorted[n + 1];
for (int i = 0; i < n; i++)
sorted[i] = requests[i];
sorted[n] = head;
qsort(sorted, n + 1, sizeof(int), compare);
int head_idx = 0;
for (int i = 0; i <= n; i++) {
if (sorted[i] == head) {
head_idx = i;
break;
}
}
// 오른쪽으로 이동
for (int i = head_idx; i <= n; i++) {
printf("서비스: %d\n", sorted[i]);
total_movement += abs(sorted[i] - head);
head = sorted[i];
}
// 디스크 끝까지 이동
total_movement += abs(disk_size - 1 - head);
head = disk_size - 1;
// 왼쪽으로 이동
for (int i = head_idx - 1; i >= 0; i--) {
printf("서비스: %d\n", sorted[i]);
total_movement += abs(sorted[i] - head);
head = sorted[i];
}
printf("총 헤드 이동: %d\n", total_movement);
}
int main() {
int requests[] = {98, 183, 37, 122, 14, 124, 65, 67};
int n = sizeof(requests) / sizeof(requests[0]);
scan(requests, n, 53, 200);
return 0;
}
3. NVM (Non-Volatile Memory) Devices - SSD
An SSD (Solid State Drive) is a NAND flash memory-based storage device that, unlike HDDs, has no mechanical parts.
SSD Internal Structure
┌──────────────────────────────────────┐
│ SSD Structure │
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Channel 0│ │ Channel 1│ ... │
│ │ ┌──────┐ │ │ ┌──────┐ │ │
│ │ │Die 0 │ │ │ │Die 0 │ │ │
│ │ │┌────┐│ │ │ │┌────┐│ │ │
│ │ ││Blk ││ │ │ ││Blk ││ │ │
│ │ ││Page││ │ │ ││Page││ │ │
│ │ │└────┘│ │ │ │└────┘│ │ │
│ │ └──────┘ │ │ └──────┘ │ │
│ └──────────┘ └──────────┘ │
│ │
│ FTL (Flash Translation Layer) │
│ - Logical address → Physical │
│ address mapping │
│ - Garbage Collection management │
│ - Wear Leveling │
└──────────────────────────────────────┘
SSD vs HDD Comparison
| Property | HDD | SSD |
|---|---|---|
| Read Speed | ~200 MB/s | ~3,500 MB/s (NVMe) |
| Write Speed | ~150 MB/s | ~3,000 MB/s (NVMe) |
| Random I/O | Hundreds of IOPS | Hundreds of thousands of IOPS |
| Latency | Several ms | Tens of us |
| Durability | Mechanical wear | Write cycle limit (TBW) |
| Price/GB | Low | High |
NAND Flash Characteristics
- Read: Page-level (4-16 KB)
- Write: Page-level (only to empty pages)
- Erase: Block-level (hundreds of pages)
- Write Amplification: More physical writes occur than the actual data written
4. RAID (Redundant Array of Independent Disks)
RAID is a technology that combines multiple disks to improve performance, reliability, or both.
RAID Level Structures
RAID 0 (Striping)
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│ A1 │ │ A2 │ │ A3 │ │ A4 │
│ A5 │ │ A6 │ │ A7 │ │ A8 │
└─────┘ └─────┘ └─────┘ └─────┘
Disk 0 Disk 1 Disk 2 Disk 3
→ Performance improvement, no fault tolerance
RAID 1 (Mirroring)
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│ A1 │ │ A1 │ │ A2 │ │ A2 │
│ A3 │ │ A3 │ │ A4 │ │ A4 │
└─────┘ └─────┘ └─────┘ └─────┘
Disk 0 Disk 1 Disk 2 Disk 3
→ Mirror copy, high fault tolerance
RAID 5 (Distributed Parity)
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
│ A1 │ │ A2 │ │ A3 │ │ Ap │
│ B1 │ │ B2 │ │ Bp │ │ B3 │
│ C1 │ │ Cp │ │ C2 │ │ C3 │
│ Dp │ │ D1 │ │ D2 │ │ D3 │
└─────┘ └─────┘ └─────┘ └─────┘
Disk 0 Disk 1 Disk 2 Disk 3
→ Distributed parity, tolerates 1 disk failure
RAID 6 (Double Parity)
→ RAID 5 + additional parity, tolerates 2 disk failures
RAID Level Comparison
| RAID | Min Disks | Capacity Efficiency | Fault Tolerance | Read Perf | Write Perf |
|---|---|---|---|---|---|
| 0 | 2 | 100% | None | Very High | Very High |
| 1 | 2 | 50% | 1 disk failure | High | Moderate |
| 5 | 3 | (N-1)/N | 1 disk failure | High | Moderate |
| 6 | 4 | (N-2)/N | 2 disk failures | High | Low |
| 10 | 4 | 50% | 1 per mirror | Very High | High |
5. Object Storage
Unlike traditional block storage or file systems, object storage manages data in units called objects.
Structure Comparison
Block Storage: File System: Object Storage:
┌────┐ /home/ ┌──────────────────┐
│Blk1│ ├── user/ │ Object ID: abc123│
│Blk2│ │ └── file.txt │ Data: [binary] │
│Blk3│ └── etc/ │ Metadata: │
│Blk4│ └── config │ size: 1024 │
└────┘ │ type: image │
Fixed-size blocks Hierarchical dirs │ created: ... │
└──────────────────┘
Flat namespace
Object Storage Characteristics
- Flat Namespace: Access by unique ID without directory hierarchies
- Rich Metadata: Custom user-defined metadata per object
- HTTP REST API: Access via HTTP methods like GET, PUT, DELETE
- Massive Scalability: Can store petabytes or more of data
- Major Services: Amazon S3, Google Cloud Storage, Azure Blob Storage
6. Cloud Storage
Storage in cloud environments is divided into several types depending on the use case.
Cloud Storage Types
┌─────────────────────────────────────────────┐
│ Cloud Storage Classification │
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ Block │ │ File │ │ Object │ │
│ │ Storage │ │ Storage │ │ Storage │ │
│ │ │ │ │ │ │ │
│ │ EBS │ │ EFS │ │ S3 │ │
│ │ High perf │ │ Shared │ │ Large │ │
│ │ Low │ │ access │ │ scale │ │
│ │ latency │ │ NFS │ │ HTTP │ │
│ │ │ │ compatible│ │ access │ │
│ └───────────┘ └───────────┘ └───────────┘ │
│ │
│ ┌───────────────────────────────────────┐ │
│ │ Storage Tiers: Hot → Warm → Cold │ │
│ │ Cost optimization based on access │ │
│ │ frequency │ │
│ └───────────────────────────────────────┘ │
└─────────────────────────────────────────────┘
7. Summary
Mass storage is a core subsystem of the operating system.
- HDD: A mechanical device where seek time is the performance bottleneck. Optimized with scheduling algorithms (SCAN, C-SCAN, etc.)
- SSD: NAND flash-based with excellent random I/O performance. Requires management such as FTL, Wear Leveling, and TRIM
- RAID: Combines multiple disks for performance and reliability. Trade-offs vary by level
- Object Storage: Suitable for large-scale unstructured data. REST API-based access
- Cloud Storage: On-demand scaling, cost optimization through tiering
Quiz: Disk Scheduling and RAID
Q1. What is the difference between the SCAN algorithm and the C-SCAN algorithm?
A1. SCAN reverses direction when the head reaches one end, servicing requests in both directions. C-SCAN services in only one direction, and when it reaches the end, immediately moves to the opposite end. C-SCAN provides better uniformity of wait times.
Q2. How is data recovered when a disk fails in RAID 5?
A2. RAID 5 uses distributed parity. The data on the failed disk can be recovered by performing XOR operations on the data and parity information from the remaining disks. However, if an additional disk fails during recovery, data will be lost.
Q3. What is Write Amplification in SSDs?
A3. Since SSDs must erase at the block level before writing, valid data must be copied to another block before erasing, resulting in more physical writes than the actual user data. This is called write amplification, and it directly impacts SSD lifespan.