CS
sol-Tutorial6

# sol-Tutorial6 - Question 1 Given 200 tracks and track 0 is...

• Notes
• 2

This preview shows pages 1–2. Sign up to view the full content.

Question 1 Given: * 200 tracks and track 0 is the outermost track * Seek time is 1 time unit per track * Service time is 2 time unit per access * Use SCAN algorithm with the initial position is track 0; this implies the direction of movement is towards inner tracks. Time Request Location Target track 0 R1 arrive 0 15 12 R2 arrive 12 15 15 15 15 17 R1 finish 15 150 102 100 150 130 R3 arrive 128 150 152 150 150 154 R2 finish 150 100 203 199 100 302 100 100 304 R3 finish 100 Request Waiting time R1 15 0 = 15 R2 152 12 = 140 R3 302 130 = 172 Average waiting time = (15 + 140 + 172)/3 = 109 time units Question 2 Given: * files size = 100 KiB = 100 × 2 10 bytes * data blocks are spread randomly in the disks * Sector size of disk 1 = 1 KiB * Sector size of disk 2 = 4 KiB * Average seek time = 10 ms

This preview has intentionally blurred sections. Sign up to view the full version.

* Average rational latency = 5 ms * Transfer time is modeled by The no. of bytes on a track is the same on both disks = 32 × 1 KiB = 8 × 4 KiB = 32 KiB
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: No. of sectors used to store f1 in disk 1 = 100 KiB / 1 KiB = 100 sectors. To sequentially read f1 , we have to read the file sector by sector, starting from the first sector. Since the data blocks are distributed randomly, this implies the sectors used for storing the data blocks are also distributed randomly. The time to locate 100 sectors = 100 × (time to seek a random track + time to rotate the disk to position the read-write head) = 100 × (10 ms + 5 ms) = 1500 ms The time to read 100 sectors = 100 × (2 × 5 ms × 1 KiB /32 KiB) = 31.25 ms The time to read f1 = 1500 ms + 31.25 ms = 1531.25 ms = 1.53 seconds For reading f2 , No. of sectors used to store f2 in disk 2 = 100 KiB / 4 KiB = 25 sectors. Time to locate 25 sectors = 25 × 15 ms = 375 ms Time to read 25 sectors = 25 x (2 × 5 ms × 4 KiB /32 KiB) = 31.25 ms Time to read f2 = 375 ms + 31.25 ms = 406.25 ms...
View Full Document

• Spring '10
• DR
• Harshad number, Hebrew numerals, Jaguar Racing, Seek time, 210 bytes, 1.53 seconds

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern