Well I'm currently developing using pycharm and sencha command in Ubuntu. (as well as a dozen tabs open in chrome). However I notice that quite often my system just "crashes".
What happens is that for 1 second the screens gets really "laggy" (mouse jumps only about 2-3 times in that second). Then the system completely freezes and I notice that my hard drive is working constantly. In this state no key combination tends to work and everything is just frozen until I hard reset my laptop (hold power button).
This tends to happen semi regularly, as in once every few days. Key combinations to open the terminal also quit working during this failure. And I've also tried "waiting" but after around half an hour my laptop was still using the hard disk constantly (I can actually hear it and the light is on).
So how can I fix such a problem? Is there a "safe program" that can always be called to (like the blue screen windows gets to when pressing Ctrl+Alt+Delete in such a situation)? Can I troubleshoot this after it has happened?
Or even better: can I prevent it?
EDIT: on advice in the comments I tried
magic sysrq to kill processes (or even reboot the system). However the laptop also fails to react to any such key combination. Also other buildin physical buttons like on the laptop stop working (like put screen to black, increase fan speed and disable wan antenna).