ArticleslgStudy

computer science

Flash file system

Flash file system is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Flash file system rather than just read about it. In short: A flash file system is a file system designed for storing files on flash memory–based storage devices. While flash file systems are closely related to file systems in general, they are optimized for the nature and characteristics of flash memory (such as to avoid write amplification), and for use in particular operating systems.

Key takeaways

  • Flash file system belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Flash file system to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Flash file system from memory before moving on to harder problems.

Reference excerpt

A flash file system is a file system designed for storing files on flash memory–based storage devices. While flash file systems are closely related to file systems in general, they are optimized for the nature and characteristics of flash memory (such as to avoid write amplification), and for use in particular operating systems.

Overview While a block device layer can emulate a disk drive so that a general-purpose file system can be used on a flash-based storage device, this is suboptimal for several reasons:

Erasing blocks: flash memory blocks have to be explicitly erased before they can be written to. The time taken to erase blocks can be significant, thus it is beneficial to erase unused blocks while the device is idle. Random access: general-purpose file systems are optimized to avoid disk seeks whenever possible, due to the high cost of seeking. Flash memory devices impose no seek latency. Wear leveling: flash memory devices tend to wear out when a single block is repeatedly overwritten; flash file systems are designed to spread out writes evenly. Log-structured file systems have all the desirable properties for a flash file system. Such file systems include JFFS2 and YAFFS. Because of the particular characteristics of flash memory, it is best used with either a controller to perform wear leveling and error correction or specifically designed flash file systems, which spread writes over the media and deal with the long erase times of NAND flash blocks. The basic concept behind flash file systems is: when the flash store is to be updated, the file system will write a new copy of the changed data over to a fresh block, remap the file pointers, then erase the old block later when it has time. In practice, flash file systems are used only for Memory Technology Devices (MTDs), which are embedded flash memories that do not have a controller. Removable flash memory cards and USB flash drives have built-in controllers to manage MTD with dedicated algorithms, like wear leveling, bad block recovery, power loss recovery, garbage collection and error correction, so use of a flash file system has limited benefit. However, some flash file systems, such as APFS and F2FS, can be used on FTL-based flash devices such as SSD and eUFS. Flash-based memory devices are becoming more prevalent as the number of mobile devices is increasing, the cost per memory size decreases, and the capacity of flash memory chips increases.

Origins The earliest flash file system, managing an array of flash as a freely writable disk, was TrueFFS by M-Systems of Israel, presented as a software product in PC-Card Expo at Santa Clara, California, in July 1992 and patented in 1993. One of the earliest flash file systems was Microsoft's FFS2, for use with MS-DOS, released in autumn 1992. FFS2 was preceded by an earlier product, called "FFS", which however fell short of being a flash file system, managing a flash array as write once read many (WORM) space rather than as a freely writable disk. Around 1994, the PCMCIA, an industry group, approved the Flash Translation Layer (FTL) specification, based on the design of M-Systems' TrueFFS. The specification was authored and jointly proposed by M-Systems and SCM Microsystems, who also provided the first working implementations of FTL. Endorsed by Intel, FTL became a popular flash file system design in non-PCMCIA media as well.

Linux flash filesystems JFFS, JFFS2 and YAFFS JFFS was the first flash-specific file system for Linux, but it was quickly superseded by JFFS2, originally developed for NOR flash. Then YAFFS was released in 2002, dealing specifically with NAND flash, and JFFS2 was updated to support NAND flash too. UBIFS UBIFS has been merged since Linux 2.6.22 in 2008. UBIFS has been actively developed from its initial merge. UBIFS has documentation hosted at infradead.org along with JFFS2 and MTD drivers. Some initial comparison show UBIFS with compression faster than F2FS. LogFS LogFS, another Linux flash-specific file system, is currently being developed to address the scalability issues of JFFS2. F2FS F2FS (Flash-Friendly File System) was added to the Linux kernel 3.8. Instead of being targeted at speaking directly to raw flash devices, F2FS is designed to be used on flash-based storage devices that already include a flash translation layer, such as SD cards.

Union filesystems

Overlayfs, Unionfs, and aufs are union filesystems, that allow multiple filesystems to be combined and presented to the user as a single tree. This allows the system designer to place parts of the operating system that are nominally read-only on different media from the normal read-write areas. OpenWrt is usually installed on raw flash chips without FTL. It uses overlayfs to combine a compressed read-only SquashFS with JFFS2.

Translation layers

See also List of flash file systems Wear leveling Write amplification

References

External links Presentation on various Flash File Systems – 2007-09-24 Article regarding various Flash File Systems – 2005 USENIX Annual Conference Survey of various Flash File Systems – 2005-08-10 Anatomy of Linux Flash File Systems – 2008-05-20

Worked examples

Example 1 — a first encounter with Flash file system

Start with the simplest possible case. Write down what Flash file system claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Flash file system before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Flash file system ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Flash file system

In research
Flash file system appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Flash file system in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Flash file system is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer file systems, Computer memory, Flash file systems, so understanding it makes those chapters shorter.
In everyday life
Look for Flash file system outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Flash file system” →

How to study Flash file system in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Flash file system means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Flash file system out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Flash file system in simple terms?

A flash file system is a file system designed for storing files on flash memory–based storage devices. While flash file systems are closely related to file systems in general, they are optimized for the nature and characteristics of flash memory (such as to avoid write amplification), and for use i…

Why does Flash file system matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Flash file system?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Flash file system.

Tags

  • Computer file systems
  • Computer memory
  • Flash file systems

Keep exploring