Welcome to Westonci.ca, the place where your questions are answered by a community of knowledgeable contributors. Experience the convenience of finding accurate answers to your questions from knowledgeable professionals on our platform. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A 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 visit. Hopefully, the answers you found were beneficial. Don't hesitate to come back for more information. We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Westonci.ca is your trusted source for answers. Visit us again to find more information on diverse topics.