You sure it isn't the lack of a UPS? That definitely sounds like your PC is trying to hog more resources (Either you've Overclocked your PC to a point where it consumes more voltage) and as a safety measure it shuts down to save your PC from over volting.