Not sure where I should have put this, But I've been having this problem for a few months now.
Usually when I'm installing software at some point or multiple times the computer will literally hiccup.
It freezes for about 1 second, Mouse freezes,Sound gets stuck on whatever it was playing like a constant tone.
this happens even when I have freshly installed a new windows and am installing stuff like ccleaner or my GPU drivers.
I've taken out ram,swapped and played with it a bit to see if it gets rid of the problem but no dice.
I don't think it's the hard drive either.
Also I was using on board sound & I switched over to a new sound card so it's not that.
Wondering if it could be the CPU or the motherboard.
This may seem ridiculous but double check everything plugged into your motherboard and make sure all connections are intact, devices seated properly, etc... Smoke test and if the problem persists, next, try re-seating the CPU heat-sink: Apply a thin, but not too much, layer of thermal grease evenly over the CPU before re-seating the heat-sink.
Sounds like it's mostly happening when CPU intensive tasks are being threaded. Try reenacting some of the scenarios you described with task manager/CPU performance open and see if the CPU usage spikes are concurrent with your lock-ups and stutters. If this is the case after trying all the above, you may need a CPU replacement.