| ▲ | xenadu02 an hour ago | |
This is more or less how modern NVMe/SSD drives with power-safe save work. If they use any DRAM cache they flush that - usually to a reserved SLC cache area with pages already cleaned so the write is fast. They also sync their catalog info to the same area. The on-board capacitors are designed to be sufficient power to allow that to happen reliably. They detect the power drop and kickoff the emergency save process before the capacitors are too discharged to support continued operation. Somewhat related: my lathe has a DC brushless motor driver board. Its "on-off" is entirely driven by enabling or cutting power. The board senses the disruption of incoming power and starts its shutdown procedure. It then begins driving the motor as a generator, using the power produced to power itself. If it has a braking resistor it also dumps the excess power to that resistor to help the spindle stop faster. If not then the draw of powering itself acts as a load to drag the "generator" down. The result being it doesn't rely on mechanical friction to spin down but stops much faster even though mains voltage was cut off long ago. | ||