I have come across this problem several times now before I finally decide I should try and be doing something about it. Basically this seems to be happening when I am multitasking with iTunes playing files stored on my local SSD, Safari open with multiple tabs, and a text editor / IDE for work, and I may have Preview, Excel and Mail open too. I have the Macbook Air Mid 2013 with i7 processor, 8GB RAM and 512GB SSD, on Yosemite (pretty sure it happened on Mavericks too).
When my laptop hangs, the music is stuck on a frame and it just keeps on repeating it over and over. At that point the entire system is non responsive. The display, the keyboard, the sound, it's like flipping on a light switch but the bulb stays on. The only thing I can do is hold the Power button to force restart.
I suspect a problem with iTunes, but it could be with the OS itself. The problem is I don't have any crash report or stack trace to make sense out of this and the problem happens maybe once a week or two.
How would you guys troubleshoot something like that?
EDIT: please bookmark this if you have the same problem. I'll update with observations, findings, etc.