Can you list the components of your computer so we know what we're dealing with?
If you think the cpu heatsink is loose then why don't you tighten it down?
What about the ram makes you think that it's causeing this problem?
Did you build this Pc yourself or did you buy it already built?
Have you checked and rechecked the wireing connections to make sure one of them are not loose , the hard drives both ends of the sata cables and the sata power cable.