ch 13. mass-storage structure
DESCRIPTION
Ch 13. Mass-Storage Structure. 2014-10-08. 13.1 Disk Structure. Disk Structure characteristic of H/W. track. sector. cylinder. 13.1 Disk Structure. 20 ~ 1500 track / disk 4 ~ 32 sector / track 32 ~ 4k bytes / sector number of track = number of cylinder - PowerPoint PPT PresentationTRANSCRIPT
Ch 13. Mass-Storage Structure
04/20/23
OS Ch.13 Mass Storage Structure - 2 -
13.1 Disk Structure Disk Structure
characteristic of H/W
sector
track
cylinder
OS Ch.13 Mass Storage Structure - 3 -
13.1 Disk Structure
20 ~ 1500 track / disk4 ~ 32 sector / track32 ~ 4k bytes / sectornumber of track = number of cylindertotal number of sector = surface * cylinder * number of
sectoraccess time of Disk = seek time + latency time
+ transmission time seek time
• searching time of correct cylinder latency time
• time that read-write head are moved to correct sector transmission time
• time that information are transmitted
OS Ch.13 Mass Storage Structure - 4 -
1. FCFS scheduling Most simplest form of scheduling ex) Track # of Disk Queue
13.2 Disk Scheduling
Queue = 98, 183, 37, 122, 14, 124, 65, 67
head starts at 53
0 14 37 53 65 67 98 122 124 183 199
Figure 13.1 FCFS disk scheduling
Head Movement of 640 Track
OS Ch.13 Mass Storage Structure - 5 -
13.2 Disk Scheduling
2. Shortest Seek Time First ( SSTF ) most nearest demand first ( generally used ) about 1/3 compared with FCFS 236 track head movement Possibility of starvation
Queue = 98, 183, 37, 122, 14, 124, 65, 67 head starts at 53
0 14 37 53 65 67 98 122 124 183 199
Figure 13.2 SSTF disk scheduling
OS Ch.13 Mass Storage Structure - 6 -
13.2 Disk Scheduling
Scan ( Elevator algorithm )Head goes and comes again from inside of disk to outsideGood for large amount of disk usage ( usually long
waiting )
Queue = 98, 183, 37, 122, 14, 124, 65, 67 head starts at 53
0 14 37 53 65 67 98 122 124 183 199
Figure 13.3 SCAN disk scheduling
OS Ch.13 Mass Storage Structure - 7 -
13.2 Disk Scheduling
4. C-SCAN ( Circular SCAN ) If reached at one side of disk, scan again at start point.
Uniform wait time
Queue = 98, 183, 37, 122, 14, 124, 65, 67 head starts at 53
0 14 37 53 65 67 98 122 124 183 199
Figure 13.4 C-SCAN disk scheduling
OS Ch.13 Mass Storage Structure - 8 -
13.2 Disk Scheduling5. Look : Look for request
Observe the direction of scan
If request come, continue scanning or change the direction.
6. C - Look Directory or Index block : Center of the disk. ( ∵ to reduce the head movement )Queue = 98, 183, 37, 122, 14, 124, 65, 67 head starts at 53
0 14 37 53 65 67 98 122 124 183 199
Figure 13.5 C-LOOK disk scheduling
OS Ch.13 Mass Storage Structure - 9 -
13.3 Disk Management Disk Management
Disk Formatting• before the computer make use of disk, • the disk broken into the sector ( Physical Formatting )
Boot Block• O.S Kernel exist -> Bootstrap program -> computer power on -> initial program load -> O.S operating
Bad Block• Disk have moving parts and small tolerance (head floats …. )• Disk of bad block from the factory ( unreadable / unwritable )• searching method of manual and format command
OS Ch.13 Mass Storage Structure - 10 -
13.4 Swap-space Management Swap-space use
Used to hold the entire process image Paging systems may simply store pages Load can be spread over the system’s I/O device
Swap-space location Normal file system Separate disk partition
Swap-space management 4.3 BSD : enough space is set Solaris : thrown away if selected for pageout