contiguous allocation of the disk

20 pts.
Tags:
OS
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 requires a seek and a 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 8MB/sec and an average file size of 8KB, how long does it take to read a file into main memory then write it back to the disk at a new location? Using these numbers , how long would it take to compact a 8GB disk? Would that be a good idea?
ASKED: October 5, 2007  8:11 AM
UPDATED: February 1, 2012  8:38 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

It is not recommended to compact the disk every time you remove a file, as a small number of holes does not matter much in read/write operation, it is only recommended on a periodic basis depending on how frequently you remove file from your disk. All speeds being taken into consideration, it is worth doing the operation as if you compare the overall time taken to defrag/compact your disk viz a viz the speed enhancement you get in return for your next cycle of operations is still worth.

=========
I believe that it is not advisable to compact the disk every time a file is removed. This is because this would possibly affect the efficiency of the disk and could cause hardware failure. It would be better if you perform the compacting or defragmenting of files at once in every predefined time.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Os
    a seek time of 5m/sec , a rotaitnal delay of 4msec a transfer rate of 8mb/sec, and an average file size of 8kb , how long does it take to read a file into main memory the write it back to the disk at a new lociton? using these numbers, how long would it take to compact half of a 16-gb disk?
    20 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following