Mass Storage Structure Flashcards
how is a disk structured?
- a 1d array of logical blocks (a block is the smallest unit of transfer)
- data is addressed with logical block number
What is CLV and CAV?
Constant linear velocity:
- change speed based on location on disk
Constant angular velocity:
- varying data density so constant speed
what makes a good disk?
- bandwidtch
- access time
- reliability
- power
- cost
- capacity
what is FCFS scheduling in storage? pros and cons
- first request gets serviced
- simple, fair (no starvation)
- may involve excessive head movement because we dont take into account other requests
what is SSTF scheduling in storage? pros and cons
- shortest seek time first
- the next request serviced is the one with the shortest seek time
- we try to service all request in a local area before moving
- we know future requests (unlike SJF processing)
- can cause starvation
what is SCAN scheduling in storage? pros and cons
- head continually scans disk from one end to another and back (elavator algorithm)
- requests are serviced as the head passes that area
- fair
- no starvation
- the delays are non-uniform (requests may arrive just in time or just too late)
what is C-SCAN scheduling in storage? pros and cons
- a variant on SCAN
- return to the start immediately on reaching end rather than using the elavator algorithm, more of a circle
- better than C-SCAN because theres no favour for bits in the middle
what is LOOK/C-LOOK scheduling? pros and cons
- like C-SCAN but the head only goes as far as the final request in each direction
- better because there’s no reason to go to areas where there’s no requests
what scheduling do SSDs commonly use? why?
FCFS because they don’t have a head so they don’t need to minimise head movement
how do we get deduplication?
using cryptographic hashing. compare the hash of two files to see if they’re the same. if theyre they same only store it once
how do SSDs prevent wear?
SSDs have microcontroller with their own logical/physical memory. Addr. 1 isnt always the same addr 1. this prevents wear on the disk
how do we prevent unnecessary writing when hashing? (snapshotting)
adding anything to a file will drastically change the resulting hash
can use blocking: splitting the file into fixed length blocks and hashing those individually. requires more computational power and doesn’t deal with all cases (adding to the beginning of the file breaks the blocks)
variable length blocks using a rolling hash to determine the size of the length of blocks. this is difficult to parallelise
What is the RAID structure?
Redundant Array of Inexpensive Disks
many disks attached to a computer system.
improves reliability by having more than one copy of the data. Uses mirroring and striping techniques
what is mirroring?
a single logical disk consists of two mirrored physical disks, with writes being carried out on both disks. this doubles read performance because we can take from either copy.
what is data striping?
the data is fragmented and each fragment is written to a different disk