37. Hard Disk Drives Flashcards

1
Q

What is hard drive consists of?

A
  1. Platter - a circular hard surface on which data is stored by including magnetic changes on it. Each platter has two sides - each called surface.
  2. Spindle - a thing in the middle which rotates at RPM rate the platters to find the needed sector.
  3. Track - a concentric circle of sectors located on surface. Surface has many thousands of tracks.
  4. Sectors - actual units for processing located on tracks
  5. Head - the pointer to a sector
  6. Arm - moves across the surface to position head over the desired track
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is rotational delay?

A

The time taken by spindle to rotate platter to the desired sector

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

How is processing of moving the spindle called?

A

Seek

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

What are phases of seek?

A

Acceleration phase (arm gets moving), coasting phase (arm gets full speed), deceleration (arm slows down), settling (head is positioned over correct track), time of which is quite significant, transfer.

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

What are zones?

A

Due to geometry, the outer tracks usually are bigger and can fit more sectors. Such tracks are distributed into zones, where each zone is a consecutive set of tracks on a surface. Each zone has the same number of sectors per tracks.

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

What is track buffer?

A

It’s a disk cache

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

What is write-back and write-through?

A

Write-back is when the operation is reported as completed when the data is only written to memory, but not yet on disk. Write-through is when it’s reported only when the data is already on disk.

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

How to calculate time for I/O operation?

A

Time for seek + time for rotate + time for transfer

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

How to calculate device throughput?

A

Size Transfer divided by time of I/O operation

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

How does SSTF work?

A

When SSTF is implemented in the device and it’s aware of disk geometry, it orders the queue of requests by track, picking the requests in the closes track first. However, if SSTF is implemented in OS, it acts like NBF, because OS only sees an array of logical blocks so it chooses the closes logical block to current position

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

Why is SSTF not effective?

A

Because it does not consider the problem of starvation, where the requests on furthest tracks would not get processed if there are many requests on nearer tracks.

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

What is SCAN algorithm?

A

It’s an algorithm where the arm moves head back and forth across all tracks, servicing requests on its way (called sweep). If a request comes in for a block that has been already serviced on this sweep, it will be queued and processed on the next sweep back.

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

What is F-SCAN?

A

Works the same as SCAN, but it freezes the queue and places any new incoming requests into a separate queue which will be processed on the next sweep. This allows to delay late-arriving (but nearer by) requests.

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

What is C-SCAN?

A

It’s an algorithm where instead of sweeping in both direction, it sweeps from outer track into inner track, and then reset the head to outer track.

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

How are these algorithms (*SCAN) are usually called?

A

Elevator algorithms

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

What does SPTF algorithms account for that SCAN or SSTF don’t?

A

The rotation time, other algorithms account only for seek time

17
Q

How does scheduler work in modern systems?

A

The OS picks what it thinks are best requests for processing (some number), then passes them to disk, and the disk controller then schedules them in a most efficient way using its knowledge of internal disk layout.

18
Q

What is merging?

A

When disk scheduler merges several requests into one, if sectors are located next to each other

19
Q

What else can disk scheduler do to improve efficiency?

A

Defer issuing of I/O request to wait for other requests to come in and do it in more optimized way