When this happens and you feel that the CPU is throttling, you can check this by opening the terminal and typing
This will keep running and show you thermal events in the terminal window. You can close it by hitting ctrl + c and quitting the terminal. When CPU_Speed_limit goes below 100, the CPU is throttling. Intel Power Gadget is a much easier option, but I haven't tried it in Yosemite, so I am not sure if it will work.
Now it's time to start trying to find the possible culprit behind your issues.
In the terminal window copy and paste this (make sure to copy the entire line, not just what is visible for the lines with the scroll bars)
Code:
kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -ef
...and press return
This will open your default text file app (usually TextEdit) and, if there is anything in there, paste the contents of TextEdit in a reply
Next, copy and paste the following in to the terminal
Code:
{ sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo; sudo defaults read com.apple.loginwindow LoginHook; echo; sudo crontab -l; } 2> /dev/null | open -ef
Repeat as above, but this will ask you for your admin password - type it in and press return (the text will not show up in the terminal when you type it in).
Do not worry, I am not doing anything nefarious and any other poster on this forum with technical knowledge will confirm that. if anything comes up in the TextEdit window, then paste it in your reply
Another line for copy and paste
Code:
{ launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; echo; crontab -l 2> /dev/null; } | open -ef
You should know the drill by now
Finally,
Code:
osascript -e 'tell application "System Events" to get name of login items' | open -ef
When copying and pasting the results of these commands, I highly recommend that you put them into [ code ] [ / code ] tags so that it is easy for us to read.
Edit:
Finally, the next time your Mac crashes, open the crash report (it will prompt after the crash/restart). You can choose to send it to Apple, but it would be useful to copy and paste the contents of it again into [ code ] tags.