eli5: Why do programs freeze, even though CPU, GPU and RAM usage are under 70%?

596 views

eli5: Why do programs freeze, even though CPU, GPU and RAM usage are under 70%?

In: Technology

3 Answers

Anonymous 0 Comments

This can happen when there is a deadlock. There are many different ways this can happen but in general the process stops executing because it is waiting for a condition which will never happen. One such example is if two execution threads are both going to make changes to an object and needs exclusive access to that object. If they both run at the same time they might end up stepping over each other and corrupting the data. But if these two jobs are started very close together then the first thread might see that the second one have started and therefore will wait until that is done, but the second thread is also seeing that the first one have started and therefore will also wait until the other thread is done. There fore you end up with two threads both waiting for each other and none of them will use any CPU. There are also plenty of other examples of other deadlock situations.

You are viewing 1 out of 3 answers, click here to view all answers.