0
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.