1 / 25

File Systems in Real-Time Embedded Applications

File Systems in Real-Time Embedded Applications. Choosing the Right Storage Media. March 7th Eric Julien. Introduction. Storage media provides a nonvolatile backing device for one or multiple partitions. Different media, different attributes: Removability, Latency,

rico
Download Presentation

File Systems in Real-Time Embedded Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. File Systems in Real-Time Embedded Applications Choosing the Right Storage Media March 7thEric Julien

  2. Introduction Storage media provides a nonvolatile backing device for one or multiple partitions. Different media, different attributes: • Removability, • Latency, • Sequential write/read throughput, • Random write/read throughput, • Cost, density, • Reliability, wear, etc.

  3. Latency in embedded systems Latency plays an often neglected role in FS performances on embedded systems. Limited memory availability in embedded system prevent writes or reads using large buffers. Global throughput becomes more affected by latency and less by I/O speed.

  4. Latency: SD Card example SanDisk 2GB MicroSD Card, SD 4 bit mode • Access time: 1.5 ms (worst case). • I/O time, 512B @ 25MHz: 40.96 µs. • Total read time: 1541 µs (I/O 2.7% of total).

  5. Storage Media Types • RAM (volatile) • Hard Disk Drive, Solid State Drive • Unmanaged Flash Memory • NOR Flash Memory • NAND Flash Memory • Managed Flash Memory • Secure Digital (SD)/MultiMediaCard • CompactFlash • USB Mass Storage Device

  6. RAM Volatile storage technology, unless battery-backed that has almost ideal performance characteristics. • Very low latency, esp. static RAM, • Fast write and read throughput.

  7. Hard Disk Drive Stores data on rotating discs called platters coated with a magnetic material. Integrate a controller providing a sector based interface. • Head movement imply seek time (latency): • Slower random access time. • Vulnerability to file system fragmentation. • Average latency around 12ms (mobile drives). • More RPM = less latency = more noise.

  8. Hard Disk Drive • Huge capacity up to a few TB. • Very low cost per bit. • Good sequential throughput • Typical modern 7200 RPM drive can sustain “disk-to-buffer” rates up to 130 MB/s (outer tracks). • Reliability • Controller provides ECC, bad sector management. • Mechanical parts can cause data loss (eg. head crash): less suitable for mobile embedded systems.

  9. Unmanaged Flash Memory Flash memory technology stores bits of information by modulating the charge on the floating-gate of field effect transistors. The presence of a charge on the floating gate affects the threshold required to activate the transistor, allowing its state to be read.

  10. Unmanaged Flash Memory Types NOR Word line • Byte/word-addressable. • More metal contacts: bigger cell size. Bit line Source line NAND Word line Source line • Page-addressable. • Less metal contacts: smaller cell size. Bit line

  11. NOR Flash • Cells must be erased prior to programming. • Byte/Word-addressable. • Suitable for eXecute In Place (XIP). • Cells are almost independent: • Byte/Word program possible. • Reads and programs don’t disturb neighboring cells. • NORs generally don’t require ECC. • Erases do affect multiple cells (page, sector, block).

  12. NOR Flash • Single-byte/word random reads are fast and low-latency. No moving mechanical parts. • Very good random and sequential read throughput. • Slow programming and erase operations. • Poor sequential and random write throughput. • High cost per bit, medium density (bigger cells). • Requires wear levelling: cell life 10 000 to 100 000 P/E cycles. • No bad blocks.

  13. NOR Flash: interface Two types of interfaces: • Parallel memory-mapped, using standard external bus interface. • Best throughput/latency, XIP support, but uses more pins. • Serially-interfaced devices (often SPI and variants). Common Flash memory Interface (CFI) standard. • Provides info on queried device including: • Size, block configuration, voltage, command set, etc. • Eliminate need for descriptor tables. • Allows new devices to be used without SW updates.

  14. NAND Flash • Cells must be erased prior to programming • Page addressable. • Not suitable for XIP (unless special controller). • Cells aren’t independent: • Smallest programmable unit: page. • Smallest erasable unit: block (many pages). • Reads and programs cause disturbance to other cells in a block. • Data reliability affected; use of ECC mandatory.

  15. NAND Flash • Page random reads are fast and low-latency. • Very good random and sequential read throughput. • Fast programming and erase operation. • Good sequential and random write throughput. • Low cost per bit, high density (smaller cells). • Requires wear leveling: • Average cell life SLC: 100 000 to 1 000 000 P/E cycles. • Average cell life MLC: 10 000 to 100 000 P/E cycles. • Bad blocks must be dealt with (incl. factory).

  16. NAND Flash: interface • Most common interface: parallel on IO bus. • Less pins than parallel NOR. • Some serial devices (often integrate ECC). • Multiple plane, multiple die devices. • Open NAND Flash Interface (ONFI) standard. • Standard pinout for multiple packages. • Standard command set. • Parameter page for querying device parameters. • Timing requirements, etc.

  17. Unmanaged Flash Comparison

  18. Managed Flash Memory NOR and NAND Flash memories, due to their erase before write nature, need to be handled differently than traditional devices. The algorithms involved are often complex and/or costly. Managed flash memory devices provide a simpler interface, taking care of logical block abstraction, wear leveling, EDC data protection, bad block management, etc.

  19. Secure Digital/MultiMediaCard Secure Digital (SD) and MultiMediaCard are removable devices that contain a storage device (often NAND) along with a controller. • Provides a standardized physical interface, socket and command set. • Basic variants of SD and MMC have identical pinouts and almost identical command set. • SD has a SPI compatible mode (MMC: opt.).

  20. Secure Digital/MultiMediaCard

  21. Secure Digital • Maximum capacity is 2GB for SD cards, 32 GB for SDHC cards and 2TB for SDXC cards. • SDA has recommended exFAT as FS for SDXC cards. • Speed class: minimum sustained sequential read/write speed in MB/s with a card in a fragmented state (class 10: non-fragmented). • Random read/write performance not controlled. • Ultra High Speed (UHS): bus modes increasing max bus bandwidth (DDR, clk rate, 1.8V).

  22. e•MMC Managed flash memory in a non-removable package, compatible with MMCplus, convenient for integrated embedded system storage. • Higher throughput bus modes, • TRIM (background erase), • Secure erase (purge), • Sanitize (purge unmapped), • Reliable writes, • Boot areas…

  23. Secure Digital/MultiMediaCard Performance of SD/MMC cards are highly dependent on embedded controller and storage device used. • Sequential read/write throughput is usually good, but may be limited by max bus rate. • Random read performance is usually middling, depending on controller latency. • Random write performance is usually poor to mediocre, depending on controller.

  24. USB Mass Storage Class Devices USB standard has a device class specifying a protocol for controlling a logical block addressed storage device through USB. Most common types: • External HDD: similar performance to internal HDDs, but may be limited in throughput by bus. • Flash memory (USB Flash drives): similar performance to SD/MMC cards, dependent on embedded controller and storage device.

  25. Storage Media Comparison USB HDD: similar to Hard Disk, USB Flash Drive: similar to SD/MMC

More Related