|
PROJECT: SINGLIX Operating System Issue: 5
Revision: 3 Date: 02/02/2008 OWNER: ERDOĐAN TAN / Istanbul / Turkiye |
|||||
|
|
|||||
|
MASTER
ALLOCATION TABLE Format of SINGLIX FS1, FS2 file systems |
|||||
|
|
|||||
|
Offset |
Item |
DATA |
Type |
Size |
Description of Item |
|
0 |
MAT Sign |
‘MAT’ |
Char |
3 byte |
SINGLIX Disk Allocation Table Descriptor |
|
3 |
FS MAT Version |
XXh |
Byte |
1 byte |
Must be 0 for Current/This MAT Version |
|
4 |
Volume Size |
XXXXXXXXh |
Dword |
4 byte |
Volume (FS) size in sectors |
|
8 |
Beginning Sector |
XXXXXXXXh |
Dword |
4 byte |
Volume (FS) beginning sector (LBA) |
|
12 |
DAT Address |
XXXXXXXXh |
Dword |
4 byte |
Beginning sector of the DAT (LBA) |
|
16 |
Sector Count |
XXXXXXXXh |
Dword |
4 byte |
Number of DAT sectors |
|
20 |
Free Sectors |
XXXXXXXXh |
Dword |
4 byte |
Free sectors of the Volume/FS |
|
24 |
First Free Sector |
XXXXXXXXh |
Dword |
4 byte |
First free sector of the Volume/FS |
|
28 |
Reserved 1 |
XXXXXXXXh |
Dword |
4 byte |
Operating system specific/reserved area 1 |
|
32 |
Reserved 2 |
XXXXXXXXh |
Dword |
4 byte |
Operating system specific/reserved area 2 |
|
36 |
Reserved 3 |
XXXXXXXXh |
Dword |
4 byte |
Operating system specific/reserved area 3 |
|
40 |
Reserved 4 |
XXXXXXXXh |
Dword |
4 byte |
Operating system specific/reserved area 4 |
|
... |
... |
... |
... |
... |
... |
|
64 |
Reserved |
XXXXXXXXh |
Byte |
448 byte |
Unused/Reserved area |
|
MAT (Master Allocation Table) is the
header/decsriptor of the Disk Allocation Table. Disk Allocation Table (DAT)
has 1 byte pointers for every sectors of the volume/FS. Evey pointer has
spesific value which shows allocation type of the related FS sector. Due to a possibility of any bad sectors in the
DAT sectors. SINGLIX FS has ability to use different MAT/DAT addresses for
the disk partition or the volume. At the FS initialization time or later, if
DAT will have bad sectors, (OS) setup program will be able to change DAT to a
new section of the FS/volume/partition. DAT is comprised by consecutive, continual
disk/FS sectors. So, if there will be any bad sectors in the DAT, it is
required to move DAT to a new section of the disk/FS. For example: For a 20 GB (41,943,040 sectors)
TR-SINGLIX FS partition, DAT size is 81920 sectors or 40 MB. If there is no
81920 continual/consecutive free (non-bad) sectors at the beginning of the
volume after the MAT sector or the FS boot sector, FS format program must
locate the DAT to proper section without any bad sectors, with minimum 81920
continual/consecutive free disk/fs/partition/volume sectors. DAT pointers are related to offset LBA
addresses of the volume/fs sectors. Every pointer address offset in the DAT
is equivalent of the sector offset in the FS/volume. (DAT byte 0
<=> FS sector 0, offset LBA
addresses). Operating system will use volume beginning
sector and free sectors area of the MAT. It will calculate and update free
sectors value by adding or subtracting allocation procedure results (after
deleting allocated sectors or allocating sectors). Or after checking free
sector value, if it finds invalid value on there, it will calculate free
sectors by checking DAT completely. (First free sector value update procedure
will be performed by using some logic.) Reserved areas on the MAT is for future
versions of the FS and Operating System and also operating system specific
calculations. (For example: The largest continual/consecutive free sectors
value and beginning location of the largest continual/consecutive free sectors
section. That is optional usage of the MAT but before MAT offset 64, it must
be remembered that SINGLIX OS will be able to use these areas as spesific
calculation areas; so, for compatibility purpose, MAT offset 28 to 64 are
TR-SINGLIX Operating system spesific areas, and they will be declared later
when SINGLIX operating system development stage is completed. They are unused
MAT areas/fields for now.) Because of SINGLIX FS uses Section Headers
(FDT, RDT, DDT and others) in the partition/volume, it is possible to recover
defective DAT section after any bad sector occurence in the DAT. The recovery
program must relocate DAT to proper location, by recovery DAT pointers by
checking headers/descriptors and signs on the partition/volume. For example:
’RDT’, ‘FDT’, ‘DDT’ are on the beginning of their retaled section
descriptors. That is a superior feature of SINGLIX FS; so, disk allocation
table is not most critical part of the file system. For example: FAT32 volume
will be collapsed when FAT32 file allocation table cluster chain is
lost/defective. But SINGLIX FS will
not be collapsed when the section headers (descriptors) are found on the the
volume/FS, even if all of DAT is erased/deleted. (Every data section is just after
of its descriptor/header. And Singlix FS descriptors –they are single
sectors- have first descriptor, next descriptor, parent directory etc.
relation pointers.) FINALLY: Disk Allocation Table method, Master
Allocation Table and RDT/DDT/FDT descriptor methods and section based disk
allocation (no clusters, no inodes...) are superiority features of SINGLIX
FS. |
|||||