How to prevent Android OS from crashing when power is cut off? Without using battery

view story

http://stackoverflow.com – I am building a device that runs Android OS. The device would be often switched off abruptly, so the OS would not be shut down properly. This can result in OS crash. So is there any way I can prevent the OS from crashing from these frequent power cuts? I am not allowed to use a battery for backup power. (HowTos)