The very first thing you should do is ensure your hard drive's integrity. Often the machine will freeze because data either cannot be written to or read from a drive sector.
In my experience, what you're experiencing is a symptom of sectors starting to go bad on your drive... not a big deal if it's only a couple of them, a very big deal if it's a lot of them or they're on your MBR.