37. Hard Disk Drives Flashcards
What is hard drive consists of?
- Platter - a circular hard surface on which data is stored by including magnetic changes on it. Each platter has two sides - each called surface.
- Spindle - a thing in the middle which rotates at RPM rate the platters to find the needed sector.
- Track - a concentric circle of sectors located on surface. Surface has many thousands of tracks.
- Sectors - actual units for processing located on tracks
- Head - the pointer to a sector
- Arm - moves across the surface to position head over the desired track
What is rotational delay?
The time taken by spindle to rotate platter to the desired sector
How is processing of moving the spindle called?
Seek
What are phases of seek?
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.
What are zones?
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.
What is track buffer?
It’s a disk cache
What is write-back and write-through?
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 to calculate time for I/O operation?
Time for seek + time for rotate + time for transfer
How to calculate device throughput?
Size Transfer divided by time of I/O operation
How does SSTF work?
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
Why is SSTF not effective?
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.
What is SCAN algorithm?
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.
What is F-SCAN?
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.
What is C-SCAN?
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 are these algorithms (*SCAN) are usually called?
Elevator algorithms