What iMac do you have? If OnyX doesn't resolve your problems and you are running Lion or Mountain Lion, boot to the recovery partition with command R, then run disk utility repair disk permissions and repair disk. If running an earlier OS, boot from your OS DVD and run the the same. If you still have a problem and your iMac dates from 2007/8, there's always a possibility your hard drive could be starting to fail, I see lots of failures from WD 250, 320 and 500GB drives from that era. If you aren't already regularly backing up now is the time to start.