Log in Sign up
Back to Discover
💻

File system

technology Maturity 11-13

A computer has many files.

File system fragmentation.svg
File system fragmentation.svg
A file system keeps them in order. It works like a folder. This helps you find your work. It keeps your things safe too. Do you have files on a computer?

39 words

A computer has many files.

File system fragmentation.svg
File system fragmentation.svg
A file system keeps them in order. It works like a folder. This helps you find your work. It also keeps your things safe.
Dir command in Windows Command Prompt.png
Dir command in Windows Command Prompt.png

It can put files in groups. These groups are called folders. You can even put folders inside other folders. This makes a big chain of groups.

Every file has a name. This name helps the computer find it. Some names might look the same, but they are in different folders. This keeps them separate.

The system also tracks space. It knows which parts are full. It knows which parts are empty. This helps it save new files.

When you delete a file, the space becomes free. The computer can then use it again. It is a very smart way to stay organized.

140 words

A computer has many files. A file system is the way it organizes them.

File system fragmentation.svg
File system fragmentation.svg
It acts like a manager for your data. Without it, apps might use storage in ways that cause data loss. It can also lead to data corruption.

Files use names to stay unique. You can put files into groups called directories. These are also known as folders. You can even put folders inside other folders. This creates a hierarchy, which is a set of layers.

Dir command in Windows Command Prompt.png
Dir command in Windows Command Prompt.png

The system also tracks metadata. Metadata is extra information about a file. It includes the file name and size. It also tracks when you last changed a file. It even knows who owns the file.

File systems manage storage space. They track which parts are full and which are free. Sometimes, files become fragmented. Fragmentation happens when a file is not stored in one solid piece.

File system fragmentation.svg
File system fragmentation.svg
This can slow down some hard drives. It does not affect solid-state drives. The system also uses access control. This helps keep certain files private from other users.

185 words

A file system is a very important part of a computer. It is a system that manages how files are organized and accessed. Think of it as a digital manager for your data. This manager works within the operating system to help different applications. It also helps networked computers share files with each other. Without this system, applications might try to use storage in ways that clash. This could lead to data corruption or even losing your files entirely.

File system fragmentation.svg
File system fragmentation.svg

How does this digital manager work? It uses different layers to handle your data. The first layer is called the logical file system. This layer uses an application programming interface, or API, to handle tasks like opening, closing, reading, and writing files. It also manages security and keeps track of which files are currently open. Below that is the physical file system layer. This layer talks directly to the storage device, like a hard disk. It handles the small details like writing data blocks and managing memory.

Dir command in Windows Command Prompt.png
Dir command in Windows Command Prompt.png

People have been using the idea of filing systems for a long time. Before computers existed, people used filing systems to organize paper documents. By the year 1961, the term was used for computerized filing. By 1964, the term was being used by almost everyone. Today, file systems work on many different types of storage. They work on hard disk drives (HDDs) and solid-state drives (SSDs). They also work on magnetic tapes and optical discs. Some systems even use a part of the computer's main memory as a storage device.

100 000-files 5-bytes each -- 400 megs of slack space.png
100 000-files 5-bytes each -- 400 megs of slack space.png

File systems use many specific tools to keep things tidy. They use file names to identify exactly which file an application needs. These names are usually unique within a single directory. Directories, which are also called folders, help group files together. Some systems allow for a hierarchy, where folders live inside other folders. Many famous systems use these structures, like NTFS in Windows or HFS+ on older Macs. The system also tracks metadata, which is extra information about a file. This includes the file size, the date it was last changed, and who owns it.

Btrfs qgroup screenshot.png
Btrfs qgroup screenshot.png

Managing space is another big job for the file system. It tracks which areas of a disk are full and which are empty. When you delete a file, the system marks that space as free to use again. Sometimes, a file might not fit perfectly into the storage blocks. This creates tiny bits of unused space called slack space. Over time, files might also become fragmented. This happens when a file is split into pieces instead of staying in one solid block.

File system fragmentation.svg
File system fragmentation.svg
While fragmentation can slow down some hard drives, it does not affect solid-state drives.

472 words

A file system, often abbreviated as FS, is a fundamental component of modern computing. It acts as the governing structure for file organization and access. Within a computer, the file system is a capability of the operating system. It services the various applications running on that same machine. Beyond a single computer, it can also function as a protocol. This allows for file access between different computers on a network. Essentially, it provides a data storage service. This service allows multiple applications to share mass storage resources effectively.

Without a file system, computing would be chaotic and unreliable. Applications might attempt to access storage in incompatible ways. This lack of coordination can lead to resource contention. It can also result in data corruption or total data loss. To prevent this, file systems use a layered architecture. The top layer is the logical file system. This layer provides high-level access through an application programming interface, or API. It handles operations like opening, closing, reading, and writing files. It also manages security, protection, and per-process file descriptors.

Dir command in Windows Command Prompt.png
Dir command in Windows Command Prompt.png

Below the logical layer sits the physical file system layer. This layer provides low-level access to the actual storage device, such as a disk. It is responsible for reading and writing data blocks. It also handles buffering and memory management. This layer controls exactly where data blocks are placed on the storage medium. It uses device drivers or channel I/O to communicate with the hardware. In some setups, an optional virtual file system layer exists. This layer can support multiple concurrent instances of different physical file systems.

File system fragmentation.svg
File system fragmentation.svg

File systems organize data using specific attributes like names and directories. A file name identifies a specific file to an application or user. Generally, these names must be unique within a single directory. While many systems restrict name length, most modern ones support the Unicode character set. Directories, also known as folders, allow users to segregate files into groups. Some systems use a flat structure, while others allow for complex hierarchies. In a hierarchy, a directory can contain other directories, known as subdirectories. The Multics operating system was the first to support these arbitrary hierarchies.

File system fragmentation.svg
File system fragmentation.svg

Beyond the file content itself, the system manages metadata. Metadata is "data about data" and is stored separately from the file content. This information includes the file name, size, and the date it was last modified. It also tracks the owner and specific access permissions. Metadata can include whether a file is read-only or executable. Some systems, like NTFS or HFS+, even support extended file attributes. These can include user-defined details like an author's name. Some advanced systems even allow for multiple data collections, called streams or forks, under one name.

100 000-files 5-bytes each -- 400 megs of slack space.png
100 000-files 5-bytes each -- 400 megs of slack space.png

Efficiently managing storage space is a constant challenge for the file system. It must track which areas of a device are occupied and which are free. When a file is deleted, the system simply marks that space as available. However, storage is often allocated in granular units called clusters or blocks. If a file does not perfectly fill these units, it creates unused "slack space." For example, using 4,096-byte clusters for 100,000 tiny five-byte files can waste over 400 megabytes.

100 000-files 5-bytes each -- 400 megs of slack space.png
100 000-files 5-bytes each -- 400 megs of slack space.png
Additionally, files can become fragmented. This occurs when a file is stored in non-contiguous blocks rather than one continuous piece. While fragmentation can slow down hard disk drives, it does not affect solid-state drives.
File system fragmentation.svg
File system fragmentation.svg

Finally, file systems are vital for data integrity and security. They ensure data remains consistent even during crashes or power failures. The system may use recovery methods to handle unwritten data after a reboot. For security, file systems often implement access control. This prevents unauthorized users from reading or modifying sensitive files. This is achieved through passwords, permission bits, or access control lists. Some systems even include built-in encryption methods. Administrators can also set storage quotas to limit how much space a specific user can consume.

Btrfs qgroup screenshot.png
Btrfs qgroup screenshot.png

686 words
🖼️ Images & Media (4)
File:100 000-files 5-bytes each -- 400 megs of slack space.png
100 000-files 5-bytes each -- 400 megs of...
File:File system fragmentation.svg
File system fragmentation.svg
File:Btrfs qgroup screenshot.png
Btrfs qgroup screenshot.png
File:Dir command in Windows Command Prompt.png
Dir command in Windows Command Prompt.png
Up Next
💻
Computer file
Technology
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.