Upload
thundrox
View
219
Download
0
Embed Size (px)
Citation preview
8/14/2019 Introduction to PC Operating Systems Homework Lesson 07 Ednalyn de Dios
1/3
Document1 CTC Spring 2010
Page 1 of 3
Chapter 7
Exercise #3 Given a disk pack with 10 platters yielding 18 recordable surfaces
A = Rotational speed = 10msB = Transfer rate = 0.1ms/trackC = Density per track = 19,000 bytesD = Number of records to be store = 200,000 recordsE = Size of each record = 160 bytesF = Block size = 10 logical recordsG = Number of tracks per surface = 500
a) Number of blocks per track: (C) / (E*F) 19,000 / (160*10)
19,000 / 1600 11.875 11 BLOCKS
b) Waste per track: C (E*F*11) 19,000 (10*160*11) 19,000 17,600 1,400 BYTES
c) Number of tracks required to store the entire file: (D*E) / C
(200,000*160)/19,000 32,.00,000/19,000 1,684.2105263157894 1,684 TRACKS
d) Total waste to store the entire file: 1,400 * 1,684 2,357,600 BYTES
e) Time to write all of the blocks: (A+((B*11)*F))*(11*1,684) (10+((.1*11)*10))*(11*1,684) (10+(1.1*10))*18,524 (10+11)*18,524 21*18,524 389,004 MS
f) Time to write all of the records if theyre not blocked: (A+(C*B))*D
8/14/2019 Introduction to PC Operating Systems Homework Lesson 07 Ednalyn de Dios
2/3
Document1 CTC Spring 2010
Page 2 of 3
(10+(19,000*.1))*200,000 (10+1,900)*200,000 1,910*200,000 380,000,000 MS
g) Optimal blocking factor to minimize waste: IDK.
h) What would be the answer to (e) if the time it takes to move to the next track were5ms?
389,004 + (5*1,684)
*** NOTE: ME THINKS MY FORMULA IS WRONG DEPENDING ON HOW ROTATIONAL SPEED IS DEFINED. INOTICED I HAVENT USED THE GIVEN INFOOF 500 TRACKS PER SURFACE SO MY HUNCH IS THAT ITSHOULD BE CONFINED WITH VARIABLE IN COMPUTING TIME
Exercise #4 Given that it takes 1 ms to travel from one track to the next, and that the arm is originallypositioned at Track 15 moving toward the low-numbered tracks, compute how long it will take to satisfythe following requests:
4, 40, 11, 35, 7, and 14 Using the LOOK policy All request are present in the wait queue Ignore rotational time and transfer time; just consider seek time
1. How does the result compare with Fig. 7.16?
START FINISH TRAVELED 5 10 15 20 25 30 35 4015 14 1 X14 11 3 X11 7 4 X7 4 3 X4 35 31 X
35 40 5 XTotal # of Tracks Traveled:
47 Heres my stating the obvious: less both distance traveled as well as average travel between jerksAverage # of Tracks Traveled:
7.833333333333333333333
2. Why do you think there is a difference between the two? The reverse direction made thedifference: the path the arm had taken was identical to Fig. 15 which was operating under theSSTF (Shortest Seek Time Policy) policy.
8/14/2019 Introduction to PC Operating Systems Homework Lesson 07 Ednalyn de Dios
3/3
Document1 CTC Spring 2010
Page 3 of 3
Exercise #8 Compute how long it will take to process then records
A = Time to transfer a record 1ms B = Time to process a record 2ms C = Time to access the next record 1ms (10ms divided by ten records)
D = Number of records
The only thing that I noticed is that it takes the disk 10ms to make a complete rotation and since a trackalso holds 10records, I took the straight forward approach and assumed that by the time the F hasfinished a particular task, the disk is already in the right position to start the next series of task with A.Hence, ((A+B+C)*D)-C) with the - C to account for the last step which d oesnt need to access anythingsince, well, it is the last.
((A+B+C)*D) - C ((1+2+1)*10) 1 4*10-1 39ms