Finding something worth knowing…

Technology

File system meant a way of organising paper long before computers

Around 1900, a file system was a method for arranging paper documents in an office. By 1961 the phrase was being borrowed for computers, and by 1964 it was everyday jargon. The job stayed the same: keep information findable, and stop everyone who needs it from trampling on each other.

Without a file system, programs sharing a disk could each use the storage in their own incompatible way, fighting over space, corrupting data and losing it. The file system imposes order. Designs exist for hard drives, solid-state drives, tape and optical discs, and some live in memory, as with a RAM disk or tmpfs. Virtual file systems even present files that are generated on request rather than stored anywhere.

Internally a file system can be pictured as layers. The top, logical layer gives programs simple operations such as open, close, read and write, and handles directories, security and protection. An optional virtual layer lets several file systems run side by side. The bottom, physical layer reads and writes blocks on the device, buffers data and decides exactly where blocks go.

Names must be unique within a directory, though the same name can appear in different folders. Some systems treat MYFILE and myfile as one file, others as two, and most modern designs allow a wide range of Unicode characters. The Multics operating system was the first to allow folders nested to any depth, an idea later shared by Unix, Apple's HFS, the FAT system from MS-DOS 2.0 onwards, and NTFS. Alongside contents, file systems track metadata such as size, creation and modification times and whether a file can be run, usually stored apart from the data, sometimes in a structure called an inode. Some keep several streams or forks under one name, and some store past versions of a file.

Space is handed out in fixed chunks, which wastes a little at the end of most files. With 512-byte units, the average waste is 256 bytes per file; with 64-kilobyte clusters it is 32 kilobytes. Picking a unit that is too small, by contrast, slows access down.

Source: File system

Related

More in Technology · All topics