1/27
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What are the two main disadvantages of DRAM memory?
Cost per byte (expensive) 2. Volatility (loses data without power)
What are the two major components of disk access time?
Seek time: time for head to reach the correct track 2. Rotational latency: time for sector to rotate under the head (Transfer time is negligible for single sector access)
What is the structure of a magnetic hard disk?
Multiple platters on a common spindle, Surfaces covered with magnetic material, Divided into concentric tracks, Each track divided into sectors, One sector = one page = 4KB
What is zoned recording?
A technique that allows more data to be stored on outer tracks of a disk compared to inner tracks, since outer tracks have more physical space.
Why are random accesses of small data slow on HDDs?
Because each random access requires: 1. Seek time (moving head to correct track) 2. Rotational latency (waiting for sector). These mechanical movements take significant time for each small access.
What is striping and what does it improve?
Striping distributes data across multiple disks. It improves: BANDWIDTH (not latency). Multiple disks can be read/written in parallel, increasing throughput.
What is RAID and why is it used?
RAID = Redundant Array of Independent Disks. Purpose: Protect against disk failures using multiple disks with redundancy. Magnetic disks are prone to damage due to their mechanical nature.
Compare RAID 1, RAID 4, and RAID 5
RAID 1: Two disks, one mirrors the other. No parity/striping. RAID 4: Block-level striping with dedicated parity disk (bottleneck issue). RAID 5: Distributes parity evenly across all disks (solves bottleneck)
What is the parity formula in RAID 5 and why is it sufficient?
Formula: b₁ = b₂ ⊕ b₃ ⊕ b₄ (XOR operation). Sufficient because: Dominant error is complete disk failure, Can recover one failed disk using XOR, Don't need complex error correction codes
What are the main differences between HDDs and SSDs?
HDD: Mechanical, slower random access, cheaper, prone to disk failures. SSD: Semiconductor, much faster random access, 2-3× more expensive, no moving parts, limited erase cycles
What are the critical write restrictions for SSDs?
What is the difference between writing a new file vs updating an existing file on SSD?
New file: Find clean page, write directly. Update file (out-of-place write): 1. Invalidate old page 2. Find clean page 3. Write complete data to new page 4. Old page stays until garbage collection
What is garbage collection in SSDs and when is it triggered?
What: Identifies blocks with invalid pages, copies valid pages elsewhere, erases entire blocks to create clean pages. When: Running out of clean pages (threshold), During idle time (if predictable)
What is wear leveling and why is it needed?
Purpose: Evenly distribute erase operations across all blocks. Why: Blocks have limited erase cycles (10⁴-10⁶). Without wear leveling, frequently-erased blocks would fail prematurely.
What is write amplification?
Undesirable phenomenon where the actual physical data written to SSD is a multiple of the logical data intended to be written. Caused by: Garbage collection moving valid pages before erasing blocks.
What are the three purposes of spare pages in SSDs?
How does CD-ROM technology work?
One surface, one long spiral track. Laser beam + photo-detector. Physical indentations reflect light. Same phase waves = bright = 1. Out of phase waves = dim = 0. Must pass through all preceding sectors (not random access)
How does CD-ReWritable differ from CD-ROM?
Uses special alloy: Amorphous state (heated quickly): absorbs light = 0. Crystal state (annealing): reflects light = 1. Three laser powers (read/write 0/write 1). Very slow writing, sequential reading
What is Virtual Memory and what is its purpose?
Software technique with hardware support. Original: Run programs larger than physical memory. Modern: Flexible memory allocation, Manage memory access overhead, Programs use virtual addresses
What is a page table?
A table that maps virtual pages to physical pages in memory. Created by OS for each program. Resides in main memory. Contains entries for virtual → physical translation
What is TLB and what is its purpose?
TLB = Translation Lookaside Buffer. What: Special cache storing page table entries (hundreds of entries). Purpose: Speed up address translation by avoiding main memory access for every virtual address lookup
What is the Memory Management Unit (MMU)?
Hardware component that translates virtual addresses to physical addresses. Checks page table for each memory reference. Problem: Accessing page table in memory is slow → TLB needed
How do you calculate average rotational latency?
Average rotational latency = (1/2) × (60/RPM) seconds. Example: For 6,000 RPM disk: = 0.5 × (60/6000) = 0.5 × 0.01 = 0.005 seconds = 5 ms
How do you calculate worst-case access latency for a disk?
Worst-case = Worst seek time + Full rotation time. Where: Worst seek = 2 × average seek (typically), Full rotation = 60/RPM seconds
How is average access latency calculated with overlap?
Average access latency = Avg seek + Avg rotational - (overlap). Overlap: Allow half of the SMALLER value to overlap with the LARGER value. This accounts for some parallel operation
What is the smallest possible disk access latency?
Just the transfer time (data transfer rate). This occurs when: Head is already positioned on correct track (no seek), Sector is already under head (no rotation). Only need time to read the bits
Why would a disk with more platters have higher bandwidth?
More platters (with both surfaces accessible) = more surfaces that can be read in parallel. Bandwidth increases because multiple read/write heads can transfer data simultaneously from different surfaces.
What is the typical density and capacity of modern HDDs?
Typical density: 200,000 tracks per radial inch. Tracks contain: Few thousand sectors. Total capacity: 100GB to 2TB (As of 2016 notes)