Does the OS kills resource hungry process automatically if the battery becomes low

Solution 1:

The OS does have the ability to send warnings (essentially allow apps to subscribe to warnings) for low memory or low power so they may save their state or throttle down processing.

The OS doesn't kill processes, but instead goes to sleep or hibernation.

I suppose vbox could implement this, but my suspicion is that it's only coincidence.