[P1] Defragmentation method/DiskWarrior

Jack Rodgers jackrodgers at earthlink.net
Mon Nov 10 03:23:59 PST 2003


On Nov 10, 2003, at 12:00 AM, Jay Boshara wrote:

> In other words, what exactly does the Directory
> contain?

It contains points to the beginning and ending of the fragments of 
files. The segment size of a part of a file is about 6K or less. Thus 
large files are composed of many segments on the hard drive. These 
segments are not necessarily in order and may be scattered about the 
drive. Since there are many small segments, pre-hfs drives had segment 
sizes a hundred times larger and thus less fragmentation, the directory 
has to track each one. The directory itself can become fragmented as 
files are rewritten or portions deleted.

Consider copying War and Peace onto 3 x 5 cards. One each card note the 
card number of the next card.May end up with a few million of them. Now 
create a directory that gives the start and end address of the first 
card and the number of the second card on one card. Etc.

Now throw all of the first set of cards into the air and randomly pick 
them up and make the appropriate changes to the directory cards.

Now throw the directory cards in the air and pick them up one by one 
and make the appropriate changes.

Now look for the first directory card, then the second, then the third, 
each time beginning at the top of the stack.

If you reshuffled the stack you could just move from card 1 to card 2, 
etc.
Much faster. If you optimized the stack of cards for the book, you 
could a lot of time.

This explanation is very simplified and may be a tad incorrect but you 
can see the problem and will probably never want to ask again.

---
Have you ever noticed how many people who believe in telepathy use cell 
phones?



More information about the iBook mailing list