Changes

Jump to: navigation, search

MISC-TN-017: Persistent storage and read-write file systems

1,790 bytes added, 16:56, 18 January 2021
Power cut
This Technical Note deals with the use of read/write file systems in combination with such memories.
==Wear-out==
One of the most important factors to take into account is wear-out. Simply put, this is a degradation of the memory device due to repeated erasing/writing cycles aka P/E cyclesresulting a limited lifetime.  In order to mitigate this phenomenon, erasing and writing operations have to be distributed uniformly all over the memory. Please note that this process, known as wear leveling, can be either implemented in the host (in the case of a raw NAND memory, for example) or in the memory device itself (for instance, in the case of eMMC's).
Even though wear-out is properly managed, it is unavoidable when writing operations are performed. That being said, how to estimate the lifetime of such a device in practice? Manufacturers provide the number of guaranteed P/E cycles. For more details about this number, please refer to the specifications of your device, which detail the test conditions this number refers to. Once the guaranteed P/E cycles are known and '''assuming a proper wear-leveling algorithm is in place''', the expected lifetime can be determined as follows.
=====Experimental measurement of the '''actual''' written data=====
In many cases, WAF is unknown and can not be estimated either. As stated previously, the system integrator can adopt determine the lifetime expectancy by adopting an experimental approach as wellthough. The following procedure describes how to determine the '''actual ''' written data for the system used in this example.
TBD
LT = = x years
==Power cutfailures==Even though modern file systems are usually tolerant w.r.t. power failures(*), in general, sudden power cuts should be avoided and the . The system should always be turned off cleanly. As this is not alwasy always possible, several techniques can be put in place to mitigate the effects of a power failure. Se for For instance , see [[Carrier_board_design_guidelines_(SOM)#Sudden_power_off_management|this section of the carrier board design guidelines]].
That being said, TBD
 
(*) Roughly speaking, this means that these file systems are able to keep their consistency across such events. They can not avoid data loss if a power failure occurs in the middle of a write operation, however. For this reason, further countermeasures, such as data redundancy and/or the use of error-detecting/correcting codes, should be implemented at the application level for particularly important data. At the hardware level, DAVE Embedded Systems products usually leverage the "write protect" feature of flash memories in order to prevent erase/program operations during power transitions.
 
== Memory health monitoring ==
Although implementing a mechanism for monitoring the health of flash memories is not required strictly speaking, it is recommended. Think about it as a sort of life insurance to cope with unpredictable events that might occur during the life of the product. As a result of a on-the-field software upgrade, for example, new features could be added leading to an increase of data rate written onto the flash memories. Consequently, the lifetime expectancy calculated when the product was designed is not valid anymore. In such a case, a properly designed monitoring system would alert the personnel devoted to the maintenance who could take measures before it is too late (see for instance the case of eMMC's used in [https://electrek.co/2020/11/09/tesla-emmc-failure-touchscreen-offers-extended-warranty/ Tesla cars]). The following section details an example of such a system.
 
=== Example: embedded Linux system equipped with a raw NAND flash memory and UBIFS file system ===
TBD
4,650
edits

Navigation menu