question archive 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
Subject:Computer SciencePrice:4.87 Bought7
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 64 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 averagerotational delay, and the transfer time?
5. Assuming contiguous storage, namely, the records are stored In clusters from the same track as long as possible, how much Is the total time for reading the whole ?le?
6. Assuming the minimal transfer unit is one cluster, how much is the time for reading one cluster, including the seek time, the average rotationaf delay, and the transfer time?
7. Assuming random storage of the records and every record is stored In a different cluster, 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?
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 = 64 bytes
Therefore 1 sector = 512/64 8 records.
3.) 8 records in 1 sector
40000 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.
According to chegg policy i have answered only the first 4
sub parts.
5.) Given file is of 20000 records and each record Is 128
bytes.
Now total size of the file is 20000* 128B 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 6.
Now Number of tracks required to store the entire file is =
2560000B/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 ls = seek timet average rotatlonal delay
+transfer time
Here seek time is = 6 msec.
Average rotatlonal 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 = 200000/
32 625.
Hence total time for reading the whole file is = 625 8.008
msec 5050 msecC.