An application loads 100 libraries at startup and to load each library exactly one dist access is required. 10ms is the seek time of the disk to random location and 6000rpm is the rotational speed of the disk. Ignore the time to transfer data from the disk block once the head has been positioned at the start of the block. The time taken by the application to load all the libraries if all the 100 libraries are loaded from random location on the disk:
Answers
Answer:
Since transfer time can be neglected, the average access time is sum of average seek time and average rotational latency. Average seek time for a random location time is given as 10 ms. The average rotational latency is half of the time needed for complete rotation. It is given that 6000 rotations need 1 minute. So one rotation will take 60/6000 seconds which is 10 ms. Therefore average rotational latency is half of 10 ms, which is 5ms.
Given:
- Number of libraries to be loaded = 100
- Dist access required to load each library = 1
- Seek time of the disk to random location = 10ms
- Rotational speed of the disk = 6000rpm
To calculate the time taken by the application to load all the libraries, consider the following factors:
- Seek time: The time taken by the disk to move its head to the desired location.
- Rotational delay: The time taken by the disk to rotate and bring the desired sector under the head.
- Transfer time: The time taken by the disk to transfer the data from the desired sector to the memory.
The total time taken can be calculated using the following formula:
Total time = (Seek time + Rotational delay) * Number of libraries
Seek time can be calculated as 10ms per library, so for 100 libraries, it will be 1000ms (1 second).
Rotational delay can be calculated using the formula:
Rotational delay = (1/2 * RPM) / 60 seconds
Here, the rotational delay is calculated for 1 sector. Since there are multiple sectors to be read for each library, we need to multiply it with the number of sectors per track, the number of tracks per cylinder, and the number of cylinders.
Assuming 512 sectors per track, 64 tracks per cylinder, and 4 cylinders per library, we get:
Rotational delay = (1/2 * 6000) / 60 * 512 * 64 * 4 = 2.14ms
Therefore, the total time taken to load all the libraries would be:
Total time = (Seek time + Rotational delay) * Number of libraries
Total time = (10 + 2.14) * 100
Total time = 1114ms or 1.114 seconds
Hence, it will take approximately 1.114 seconds for the application to load all the libraries from random locations on the disk.
To learn more about libraries from the given link.
https://brainly.in/question/34516505
#SPJ3