For those wondering what HFS+ is about, in terms of the way it conserves
space at least, here is a very simplistic example.

Imagine you have four pigeon holes (the little shelves that letters are
stored in for people, in offices, if the usage of the phrase is too
restricted to Britain), each with the capacity to hold 10 letters, and the
first three are assigned to Fred, Jim, and Sheila respectively. To begin
with, all three of them have five letters waiting, each, and the fourth
pigeon hole is empty.

Now, imagine two scenarios:

A) Two new employees join. There is only one pigeon hole spare, and the
first new employee gets it. The second one can't have one, but, in the other
pigeon holes alone, there are 15 spare places for letters, not being used.
However, because the pigeon holes are already assigned to people, that space
is taken, and cannot be used by the new employee.

B) (And we're back to Fred, Jim and Sheila again) Now, some more mail
arrives - another ten letters, all for Jim. He only has five places left for
letters, so where do the other five go? There is plenty of room in Fred's
box for them, and in Sheila's box, and they would fit in there nicely but -
it's already taken. The only thing to do is to assign the fourth pigeon hole
to Jim also. Which means that, in that pigeon hole, there is another five
wasted spaces that no-one can use. And if the two new employees now arrived,
there would be 20 letters' worth of free space that neither could have.


Now, all discs are divided up into sectors, which relate to pigeon holes in
that this is how the system identifies the location of data on the disc,
with the people in the analogy being files on the disc. As you can hopefully
see, space on discs is wasted in exactly the same way as in pigeon holes. In
fact, humans could actually share pigeon holes, but computers cannot - one
file can use many sectors (in that one person can have many pigeon files),
but a sector can contain data of only one file.


Now, imagine that, instead of four holes that fit ten letters each, we have
eight that fit five each. That way, you can make better use of the pigeon
holes' space.


Considering HFS (which stands for "hierarchical filing system", I think):
HFS has a limited number of how many sectors (pigeon holes) any disc can
hold - 65,536 I think. For a small disc, you can have lots of small pigeon
holes. When discs start to get really big (into gigabytes) dividing up the
space into that number of sectors means that you have very large sectors.
For example, on the iMacs at university, with (I think) 4 Gb drives
formatted as HFS, the sectors are about 64k each*, meaning that even the
tiniest of files take 64k of space minimum, and extra space is offered to
that file in blocks of 64k. This wasted space soon adds up; on my 486 PC
hard disc formatted to FAT16 (the PC equivalent), 120 Mb of my 970 Mb main
partition is wasted space that cannot be used, more than one tenth of the
space available.

One of the benefits of HFS+ is that you get up to 4 billion sectors per
disc, so you can have many more, smaller sectors and get a lot less wastage.
On my Mac here, sectors are only 4k.


I assume that HFS+ offers other benefits, too. It supports long filenames,
for one thing, but most software including the Finder won't display them
properly; you'll get the first 27 or so characters of the name followed by
some seemingly random characters. This support is used by Mac OS X, though,
I assume.


I hope that offered some clarification. If it only offered everyone
migraines, well, as a disclaimer, I shan't be posting off vouchers for
headache pills over to the US ;)


- Daniel.


*100k, I thought, but Calculator tells me 64k. To work out approximate
sector size, divide the hard disc size in Mb by 60. You can also ask the
Mac: create a new file in SimpleText, leave it blank, and save it to the
desktop with Save As. Get Info on the file. The two sizes reported are the
space taken up, and the actual amount of data. For me, I see:
 Size: 4 K on disk (332 bytes)
which means that a blank file contains 332 bytes of data, but it uses up 4
Kb of disc space, and thus one sector is 4 Kb. The number on the left will
always be a multiple of the sector size for files; for folders, it seems to
be something else entirely.


-- 
StarMax is sponsored by <http://lowendmac.com/> and...

    /      Buy books, CDs, videos, and more from Amazon.com     \
   / <http://www.amazon.com/exec/obidos/redirect-home/lowendmac> \

      Support Low End Mac <http://lowendmac.com/lists/support.html>

StarMax list info:      <http://lowendmac.com/lists/starmax.html>
Send list messages to:  <mailto:[EMAIL PROTECTED]>
To unsubscribe, email:  <mailto:[EMAIL PROTECTED]>
For digest mode, email: <mailto:[EMAIL PROTECTED]>
Subscription questions: <mailto:[EMAIL PROTECTED]>
Archive: <http://www.mail-archive.com/starmax%40mail.maclaunch.com/>

Using a Macintosh? Get free email and more at Applelinks! 
<http://www.applelinks.com>

Reply via email to