tags:

views:

12

answers:

1

All,

I'm working on a Real-time system, VxWorks I think, I'm saving application settings to a file. What's the best way to handle preserving the settings if the system shuts down or loses power in the middle of a file write? All I can think of is shuffling a few files around or reducing the frequency at which i Save variables in order to reduce incidents.

A: 
  1. Hardware to hold up the power a few milliseconds and give the OS a power down warning is quite helpful!
  2. Use an ACID compliant database for critical settings, such as SQLite; it is fully transactional even in the event of a power failure
Doug Currie