

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


April 30 Start by implementing an ADT for a disk drive, with an operation that simulates disk access time according to the formula A = S + L + T, where S is seek time, L is latency time, and T is transfer time. Seek time S is given by N*R+V, where N is the number of tracks traversed, R=0.5 msec/track is rate of arm movement, and V=4. msec is the overhead time incurred whenever the arm must move to a new track. Assume the disk spins at 3600 rpm and has track numbers 0..79. Also assume each track has 16 sectors numbered 0..15. Thus, the time needed for any sector to completely pass under the head is 1.0/(3600.0/60.0)/ 16.0 = 1.0416666 msec. The head initially is on track 0 and passes over the beginning of sector 0 at simulated time 0.0 sec. Your ADT should remember the current track number of the head and know which sector is under the head at any time. This disk drive ADT should then be used to simulate the performance of a variety of disk scheduling policies. Data for the simulation is in the file Project4.dat, located at the class web site. This file contains a sequence of single sector disk requests, one request per line, according to the format:
summarized by stating the total number of requests processed by the policy, the total time to process all requests, the average seek time , and the maximum queue size during processing. There are sample calculations below that you may use to check the accuracy of your disk ADT implementation. The section also indicates the required output format. Submit
All times in msec. Head initially at start of sector 0 of track 0. **First three requests: 1 42 1 2 51 12 3 23 0 req. track sect. simul. # seek latency access queue number number number time tracks time time time size
1 42 1 0.00 42 25.2 9.175 35.417 1 2 51 12 35.417 9 8.7 1.717 11.458 4 3 23 0 46.875 28 18.2 1.592 20.833 4 4 67.708 6** Calculations of latency time and access time: