Therefore my question remains: how come, despite all the round-robin and/or other scheduling mechanics my OS still freezes?
Despite all the scheduling algorithms,the real world scenario is different. The freeze can be seen as a result of resource exhaustion. Since the RAM is limited, OS then uses swapping but it causes thrashing also. Resources necessary for some part of the system to run are not available, due to being in use by other processes or simply insufficient.
Modern OS use pre-emptive multitasking.In these cases, a single thread getting stuck will not necessarily hang the system, it will be preempted when its time slice (time quantum)expires, allowing another thread to run. If a thread does hang, the scheduler may switch to another group of interdependent tasks so that all processes will not hang.However, thread which is stuck will still consume resources: at least an entry in scheduling, and if it is running (for instance, stuck in an infinite loop), it will consume processor cycles and power when it is scheduled, slowing the system further.
However, even with preemptive multitasking, a system can hang, and a misbehaved or malicious task can hang the system, primarily by monopolizing some other resource, such as IO or memory, even though processor time can't be monopolized.
Analyzing the Ubuntu using system monitor, I can say that often processes that blocks the file system will often hang the system. But there are many factors leading to it. It can also driver issues or some hardware malfunctioning. These all can cause the system to slow down.