chapter 37 - Hard Disk Drives Flashcards

(18 cards)

1
Q

What is the basic interface of a disk drive?

A

A disk is an array of sectors, numbered 0 to n−1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What assumptions do we make about disk performance?

A

Nearby blocks are faster to access, and sequential access is faster than random access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the physical structure of a hard disk

A

Platters spin around a spindle. Each surface has concentric tracks, and read/write heads on a disk arm move to access data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is rotational delay?

A

waiting for the desired sector to rotate under the head

Average = R/2 of a full rotation time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is seek time?

A

Time it took to move the disk arm to the correct track

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is the seeks different phases

A
  • accelerate → the disk arm gets moving
  • coast → as the arm is moving at full speed
  • decelerate → as the arm slows down
  • settle → as the head is carefully positioned over the correct track
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is track skew

A

timing adjustment between the starting sectors on a hard drive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What’s the difference between write-through and write-back caching?

A

Write-through: writes to cache and immediately written to main memory as well

write-back: first to cache and later to memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the formula for total I/O time?

A

T(I/O) = T(seek) + T(rotation) + T(transfer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the I/O rate formula?

A

R(I/O) = Size(transfer) / T(I/O)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Compare random vs sequential workloads

A

Random: small, scattered reads (e.g., databases)

Sequential: large, contiguous data (e.g., streaming)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the SSTF ( Shortest Seek Time First) disk scheduler do?

A

Chooses the request on the closest track to the current head position

eks (om du ikke skjønte): current position of the head is over the inner track, and we have requests for sectors 21 (middle track) and 2 (outer track) → we would then issue the request to 21 first, wait for it to complete, and then issue the request to 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Nearest-Block-First (NBF)?

A

A software approximation of SSTF using block address distance, not physical track distance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe SCAN (Elevator algorithm)

A

The head moves in one direction, servicing requests, then reverses direction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does C-SCAN differ from SCAN?

A

C-SCAN only services in one direction, then jumps back to the start, improving fairness

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

F - SCAN

A

Freezes the request queue during a sweep; late arrivals go to a future sweep

16
Q

What is SPTF (Shortest Positioning Time First)?

A

Chooses based on seek + rotational delay

eks (for mer info): Request A needs a short seek but long rotation; request B needs longer seek but is just about to pass under the head → SPTF would choose B

17
Q

Why is SPTF hard to implement in the OS?

A

The OS doesn’t know the disk head’s rotational position