You've written much but told us nothing. Without exact technical information nobody can help you. What Mac? What version of OSX? and judging from your vague description I'd say you are facing a hardware failure in your graphics. Possibly it only shows up under stress due to heat expansion. A simple test might be to try and turn off OpenGL in the PS prefs...
I guess that would have been helpful. This is the first time I've ever written something within the forum. I have the Mac OS X Lion Version 10.7.5. I spoke with Apple three seperate times, all of which they gave me various tests and reboots. None of which is working. But the problem is isolated with Photoshop CS5 and Photoshop CS5, alone. None of my other applications are doing this. Just photoshop when I'm trying to work on a .raw image. As far as I've been able to tell, my computer isn't or hasn't been overheating.
You say it only happens when you work on raw. Is this only when you’re using the Camera Raw plug-in? If you work on a small JPG in the ACR plug-in, does it happen?
Have you tried turning off the OpenGL acceleration in PS / Preferences / Performance as Mylenium suggested?
I would agree it sounds like a video hardware failure, due to it locking up your computer. Do you have a way to photograph and share what the screen looks like when it is locked up?