Problem 1. Assume that we are using a hard disk with the following characteristi
ID: 3919134 • Letter: P
Question
Problem 1. Assume that we are using a hard disk with the following characteristics: Capacity 30 GB Average seek time 6 msec * .Spindle speed 15,000 rpm Bytes per sector 512 Sectors per cluster 8 Sectors per track 400. Assume that we have a file of 20, 000 records. Each record has 128 bytes. Answer the following questions 1. How much is the average rotational delay? 2. How many records can be stored in one sector? 3. How many clusters are needed for the file? 4. How much is the time for reading one track, including the seek time, the average rotational 5. Assuming contiguous storage, namely the records are stored in clusters from the same track 6. Assuming the minimal transfer unit is one cluster, how much is the time for reading one 7. Assuming random storage of the records and every record is stored in a different cluster, delay, and the transfer time? as long as possible, how much is the total time for reading the whole file? cluster, including the seek time, the average rotational delay, and the transfer time? reading a cluster will include the seek time, the average rotational delay, and the transfer time for that cluster, how much is the total time for reading the whole file?Explanation / Answer
1)
There is 15000 rotation in 60 seconds.
1 rotation in 60/15000 seconds.
Half rotation in 60/30000 seconds = 1/500sec.
Average rotational latency is time for 1/2 revolution.
Therefore avg rotational delay = 1/500sec = 2msec.
2.)
1 sector = 512 bytes
1 record = 128 bytes
Therefore 1 sector = 512/128 = 4 records.
3. )
4 records in 1 sector
20000 records in 5000 sectors.
Each cluster has 8 sectors.
So to accommodate 5000 sectors we need 625 clusters.
4.)
Seek time: 6msec
Avg rotational delay: 2msec
Transfer time: 4msec (time required for 1 complete rotation)
Therefore the total is 12 msec.
5.)
Given file is of 20000 records and each record is 128 bytes.
Now total size of the file is = 20000 * 128 B = 2560000 B.
Given the number of sectors per track is = 400 and the sector size is = 512 B.
Hence total size of the track is = 400 * 512 B = 204800 B.
Now Number of tracks required to store the entire file is = 2560000 B / 204800 B = 12.5 = 13(approx).
Given records are stored in clusters from the same track as long as possible.
We the time required to read the entire track as 12msec.
We have to multiply the same with 13.
So 13*12 = 156 msec.
6.)
Given Number of Sectors per cluster is = 8.
Here Access time is = seek time + average rotational delay + transfer time
Here seek time is = 6 msec.
Average rotational delay is = Rotational delay / 2 = 4/2 = 2 msec.
transfer time = R * Y / X
Here R = Rotational delay = 4 msec.
Y = cluster size = 8 * 512 B = 4096 B.
X = Track size = 204800 B.
Transfer time = R * Y / X = 4 msec * 4096 B / 204800 B = 0.08 msec.
Hence Access time is = 6 + 2 + 0.08 msec = 8.08 msec.
7.)
Given record size is = 128 bytes and given records are placed in different clusters.
Number of records per cluster is = Cluster size / record size = 4096 B / 128 B = 32.
Hence for 20000 records number of clusters is = 20000 / 32 = 625.
Hence total time for reading the whole file is = 625 * 8.08 msec = 5050 msec.
Thank you.
Please rate if you like my efforts. If you find any problem I am available in comments.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.