Welcome to Westonci.ca, your go-to destination for finding answers to all your questions. Join our expert community today! Discover solutions to your questions from experienced professionals across multiple fields on our comprehensive Q&A platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

One way to use contiguous allocation of the disk and not suffer from holes is to compact the disk every time a file is removed. Since all files are contiguous, copying a
file squires a seek and rotational delay to read the file, followed by the transfer at full speed. Writing the file back requires the same work. Assuming a seek time of 5 msec, a rotational delay of 4 msec, a transfer rate of 8 MB/sec, and an average file size of 8 KB, how long does it take to read a file into main memory and then write it back to the disk at a new location? Using these numbers, how long would it take to compact half of a 16-GB disk?


Sagot :

Answer:

The answer is below

Explanation:

a) Seek time = 5 msec, transfer time = 4 msec, transfer rate = 8 MB/sec = 8000 KB/sec, average file size = 8 KB

Transfer time = 8 KB ÷ 8000 KB/sec = 1 msec

The time required to read and write is twice the sum of the seek and transfer time.

Total time = (5 msec + 4 msec) * 2 + 1 msec = 19 msec

b) half of 16 GB = 8 GB = 8000000 KB

number of read and writes = (8000000 KB of total file size/ 8 KB of average file size) * 2 = 2000000

Transfer rate = 8 MB/sec = 0.008 GB/sec

Transfer time = 8 GB ÷ 0.008 GB/sec = 1000 sec

Total time = (5 msec + 4msec) * 2000000 + 1000 sec = 19000 sec

We appreciate your time on our site. Don't hesitate to return whenever you have more questions or need further clarification. Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. Discover more at Westonci.ca. Return for the latest expert answers and updates on various topics.