Only two things...
1. Do you have a grip attached?
2. What sort of SD card asre you using?
When I first got my K20D back in March I decided to buy a an 8gig SD card. Ended up not being worth the money, it was cheap and not very compatible with the camera. Did exactly what you are describing.
I have gone back to my Sandisk Extreme cards and not had a problem.
However, having said that my camera has frozen once ot twice since and usually after I have been changing batteries and I find if I remove and re-seat the Battery Grip it sorts it. Maybe oneof th epins isn;'t lning up I don't. All I know is my K20D hangs a lot less often than my laptop hangs or my car not starting.
A simple suggection...
Try a different card, say a simple 1gig Sandisk
Remove your grip and see if it locks up/hangs.
You may find the problem/glitch/issue(ben
) isnt the camera but an accessory fitted to the camera.
PK