Help!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nuno_silva_pt

Help!

Post by nuno_silva_pt »

can anyone tell me links about making filesystems?
and how can i make memory management aplications?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Help!

Post by distantvoices »

... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Help!

Post by Pype.Clicker »

i suggest you start reading http://members.tripod.com/~averstak/fatdox/00dindex.htm, which seems to be a good tutorial on how FAT filesystem works. As FAT is -- afaik -- the simplest file system ever, i suggest you train yourself by reimplementing one.

But before you start coding, you should learn how disks work in general (http://www.nondot.org/sabre/os/articles ... iscDrives/), except if you decide to work on a ramdisk (i.e. a simulated disk in memory).

Filesystem in general have to solve 2 problems:
  • for a given filename, create a structure that will be used to access the file (the file handle,
  • for a given file handle, read from/write to the file.
A possible file handle under FAT would include the sector number for the first cluster of the file, the sector number for the current sector, the size of the file, the logical position in the file and a memory cache for the current sector.

Creating this handle is trivial once you know how to read the entry from the FAT directory structure, so all you have to worry about is how to update it when a read() or write() is issued.
Post Reply