I've encountered it on both Windows and Linux that if some process is doing some heavy work and the cpu is under a lot of stress, the whole system can sort of freeze, other processes get slow, etc. For example on Windows it happens that the cursor doesn't respond at all, and on Linux typing even into tty has a delay for each character.
This behavior is obvious but I'm wondering how is that possible since the operating system's scheduler allocates cpu time for every process and puts it to sleep when that time's over. So even if I have a program that causes a lot of stress, how could it interrupt, for instance, the system's process in a way that it would affect my cursor? the scheduler should still give it cpu time to respond.