I'm not an iPhone user, so maybe I am wrong about this. But I would expect my phone to give me a warning when it is about 3 minutes before shutdown. This way I still have a reasonable amount of time to bring whatever I am doing at the moment into a graceful stop.