I Have two questions:
1.How do I start filesystem design do i just read/write sectors in a specific way or is it more complicated?
2.I set up my serial mouse and whenever i get a serial inteerupt it calls my handler and shows the data does know what this data means.
Mouse Type>Genius netmouse
Thanks in advance .
Filesystem Start and serial mouse data
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Filesystem Start and serial mouse data
The data you got represent the mouse movement and button clicks according to a specific mouse protocol. You can grab info about this protocol on OSRC, but i don't have a link specific to Genius Netmouse ...
Concerning the filesystem, basically you can view it as:
Layer 0 (HAL) : read and write blocks from the disk. Each block has an unique sequential ID (try to get rid of C:H:S as soon as possible)
Layer 1, Allocation service: reserve a few blocks to keep track of which "data" blocks are available and which one are in use. This may be a bitmap, block chain (discouraged), or a scatterred bitmap
Layer 2 (Block Sequence): find a way to make ordered sequence of blocks (which will hold your file's data). Through an unique identifier (the address of the first, of a root index or of an entry point in a big table), you should be able to list all the file's blocks.
Keep in mind that appending things at the end of the file will be a common operation and that allowing "holes" in the middle of a file is welcome (think at how peer-2-peer programs work)
Layer 3 (meta-data and hierarchy): using some "special" files, record names, access time and directory structure for the anonymous files you created at layer 2...
You can get some inspiration from minix, ext2 FS (info available on OSRC, once again, which is available through .:QuickLinkz:.). There's also an article of A. Tanenbaum about NTFS file system online (on InformIT iirc) ...
Imho, FAT filesystems are the worse possible thing the human brain can envision to store files. However, this is how flash devices, floppies and USB storage usually present their data to the world, so it's best to document on it and maybe starting there but keeping in mind that this is not a decent option to manage a desktop's harddisk ...
Concerning the filesystem, basically you can view it as:
Layer 0 (HAL) : read and write blocks from the disk. Each block has an unique sequential ID (try to get rid of C:H:S as soon as possible)
Layer 1, Allocation service: reserve a few blocks to keep track of which "data" blocks are available and which one are in use. This may be a bitmap, block chain (discouraged), or a scatterred bitmap
Layer 2 (Block Sequence): find a way to make ordered sequence of blocks (which will hold your file's data). Through an unique identifier (the address of the first, of a root index or of an entry point in a big table), you should be able to list all the file's blocks.
Keep in mind that appending things at the end of the file will be a common operation and that allowing "holes" in the middle of a file is welcome (think at how peer-2-peer programs work)
Layer 3 (meta-data and hierarchy): using some "special" files, record names, access time and directory structure for the anonymous files you created at layer 2...
You can get some inspiration from minix, ext2 FS (info available on OSRC, once again, which is available through .:QuickLinkz:.). There's also an article of A. Tanenbaum about NTFS file system online (on InformIT iirc) ...
Imho, FAT filesystems are the worse possible thing the human brain can envision to store files. However, this is how flash devices, floppies and USB storage usually present their data to the world, so it's best to document on it and maybe starting there but keeping in mind that this is not a decent option to manage a desktop's harddisk ...