TI-H: Re: ACPlay file system (was: Re: Toll booth...)
[Prev][Next][Index][Thread]
TI-H: Re: ACPlay file system (was: Re: Toll booth...)
>From: "Nick S [despuqué]" <worldsnow@hotmail.com>
>That may work... for maybe a little bit, but sooner or later there will
>be too many scattered words and it will have to be defragged... so no
>matter what a defrag is necessary.
Ok, there are two basic types of fragmentation. File systems
that use contigious allocation (as I am suggesting) will
experiance free space fragmentation, which is areas of
storage space that are left behind when files are deleted,
but are too small to use for new songs.
File systems that use chained storage (FAT, NTFS, HPFS, etc),
experance data fragmentation, where files are stored in
excessively small blocks scattered across the media.
Chaining type systems also see some free space fragmentation,
but it is not as serious since it does not prevent the storage
of new files (as long as sufficent total space exists).
A chained system is overkill for the mp3 player, and
contigious storage is advantagous from the standpoint
of AVR coding simplicity.
Defragmenting the free space in a contigious block
file system is very simple. All you have to do is
index though the allocation table and move any blank
entrys to the end of the table, then start at the
beginning of the table and look for free space between
data blocks (compair the end position of a song with
the start position of the next song, if the difference
is greater than 1, the gap is fragmented free space).
If there is free space, the next song is shifted back
into the free space and its allocation block updated
to reflect the songs new position.
>Also, if you transfer your whole CD,
>vinyl, tape collection to a 7 gig HDD, then if you remove
>ABBA_-_some_song and you remove ZZ_TOP_-_some_song, then if you want to
>put a song on that was bigger than both of those, then it would have to
>go partially into abba and partially into zz_top,
This would be an example of a chaining system. It would
work fine, but require more coding for the AVR.
DK
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
Follow-Ups: