how long have you had it? I had a 3 year old laptop perform like this.
the fix was a simple matter of unscrewing the panel near the cooling fan and freeing it from the gobs of cat/wife hair.
also, I've seen two computers with conflicker.c that would completely shut down mid-processes. yr first step should always be a malware scan.