Operating Systems.2 Flashcards
(43 cards)
magnetic disks rotation rate
60-250 times/second
transfer rate
rate of data flow between drive and computer
positioning time/ random-access time
seek time + rotational latency
seek time
time taken to move head to desired cylinder (usually 3-12ms)
rotational latency
time for desired sector to rotate under disk head. based on spindle speed (60/RPM)
head crash
when disk head comes in contact with disk surface
connection between drive and computer
drive attached to computer using I/O bus- busses vary.
host controller in computer uses bus to talk to disk controller built into drive or storage array
storage range for hard disks
30GB - 3TB
access latency/average access time
average seek time + average latency
average I/O time
average access time + (amount to transfer/transfer rate) + controller overhead
SSDs advantages
- non volatile (used like a hard drive)
- more reliable than HDDs
- faster
- no moving parts so no seek time/rotational latency
SSDs disadvantages
- lower capacity
- expensive per MB
- last less longer
- busses too slow: can connect directly to PCI for example
how are disk drives addressed
large 1-dimensional arrays of logical blocks- logical block = smallest unit of data transfer
low level formatting
creates logical blocks on physical media. divides disk into sectors so disk controller can read and write
mapping of array onto disks
1D array of logical blocks mapped into sectors of the disk sequentially. first sector 0, then rest of sectors on the track, then rest of tracks in the cylinder then rest of cylinders from outermost to innermost
sector 0
first sector of first track on outermost cylinder
logical to physical address is easy unless
bad sectors. (non constant num. of sectors per track)
how are disks attached to system
an array of disks are attached and have controllers
disk scheduling
OS responsible for using hardware efficiently: fast access time + disk bandwidth
disk bandwidth
total bytes transferred/total time between first request and completion of last transfer
OS disks scheduling
maintains queue of requests per disk or device. disk is busy- request is added to queue as drive controller has a buffer. optimisation algorithms used when a queue exists. Several algorithms to service I/O operations in queue.
first come first serve (FCFS)
requests serviced in the order they arrive
(SSTF) shortest seek time first
request with minimum seek time from current head position is serviced next. form of SJF scheduling: can cause starvation of requests
SCAN aka elevator algorithm
start from head and go all the way to the other end and reverse till all requests are serviced.