Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What is a file system?

Status
Not open for further replies.

Marks256

New Member
I know how to use 'em, and i know that they are needed to make things faster(faster data access), but what are they? I mean at an actual hardware/software level? Is it just a few bits that tell programs how to save stuff, or does it do something else?

Since memory has a set amount of addressing, a file system can't change anything, so what does a FS do on the disk?
 
Doesn't it determine how the data is organized on the physical space of the disk? Like a box- you only have so much space, but you can arrange the stuff inside it in different ways. You can just toss it all in, or pile it in sequentially, or group it in smaller boxes and place those neatly inside the big box.
 
It's basically just the method used to index files on a storage device. You generally access a table that stores the locations of each individual cluster used to store a file, especially after several writes and erases they're seldom all contigious so there needs to be a table to stores where each of the clusters are and redirect data access to the next contigious packet. All file systems have a certain amount of overhead (Index file size) In the DOS days and still even because it's not outdated yet the FAT (file allocation table) is still used mostly on windows based systems (Fat32) Although XP machines can use NTFS which is a bit more sophisticated. Linux uses a much more advanced file system which includes a sophisticated access and permissions system but for simple file storage FAT style architectures work very well and will probably never be completly out dated.
 
Last edited:
Oh, ok. So basically a file system creates a database to show were everything is, and the stuff they have(like permissions, and what not)?
 
Not just basically, exactly. FAT12/16/32 is the easiest to understand as it is just a straight up file system. The few system attributes (ReadOnly System Hidden or Archived) that can be applied to a file are nothing more than a 'suggestion bit' other file systems can get quiet complicated.
 
Huh. This is getting scary...
 
Marks256 said:
Oh, ok. So basically a file system creates a database to show were everything is, and the stuff they have(like permissions, and what not)?

The extremely high-level viewpoint is that a filesystem *is* a database. It's all software. At the hardware level, drives know how to read and write fixed size blocks - 512Bytes in floppy disks, 4KBytes in typical hard drives. The hardware isn't capable of anything else. Even changing a single byte requires reading out an entire block, and rewriting it. The typical "file" is a set of blocks, possibly in some really "fragmented" non-sequential order, with some additional attributes and numbers attached to it(which themselves are stored inside other blocks - typically directory tables).

Typically this software is contained inside the OS (Windows/DOS/Linux), or in BIOS libraries that can be run by the computer. Obviously this software can be rewritten to run on nearly any processor with enough memory/resources. Additionally there are now devices which blur the lines even more - single chip solutions which are capable of interpreting USB memory keys (and other storage devices) so that host processors don't need to implement the filesystem routines.
 
Marks256 said:
Huh. This is getting scary...
no need to be..a file system is an indexed array of files , and a "file-system" is seen only by the OS , the HDD just sees only 1&0 . what exactly scares you ??
an analogy: You have your working table (HDD) that has a number of draws (directories) , where you store your papers (files) . if you keep and index which list which draw has a particular magazine or paper, you'll find it easier to locate.
 
Oh but there's so much more to learn =>
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top