Why do operating systems freeze? I am currently writing from a computer on which a VM has just frozen due to exhausted RAM. I am obviously no expert in the field of operating systems but i know that they implement certain memory management methods so why can't my OS handle my alt-f4 request to kill the troublesome process in a reasonable time? 

Why can't other processess still run normally?

Shouldn't operating system swap between active tasks so that my keyboard input reaches said process? 

Operating system in itself should be of top priority with handling user input isn't that right?

Therefore my question remains: how come, despite all the round-robin and/or other scheduling mechanics my OS still freezes?

Thank You for all the answers.
Cheers.
A "system freeze" is normally due to the system running out of some resource and spending it's limited resources left trying frantically to fix up the mess. I.e., too much CPU load, has no processing power left for the user. Memory overload, keeps trying to free memory and gets nowhere, no time left for the user (and no memory to load programs).

It might also be a deadlock (some tasks inside the system are holding resources others require, and are waiting for still others to be released, but that will never happen as everybody is waiting for somebody else's resources).