my first three (yes, three) 24" 2.4 iMacs all had this freezing issue nonsense until I finally had enough and said the heck with this. my local Apple store was nice enough to allow me to return the last 24" iMac for a 2.8 machine and it's been running flawlessly since day one.
sure, I had to spend an EXTRA $500 to get a reliable machine, but it was well worth it to me. hell, I probably spent well over $100 just in gas money going back and forth to the Apple store so many times exchanging the 2.4 machines.