Deprecated: Implicit conversion from float-string "1549443645.196" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1549443645.196" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1549443645.196" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1549443645.196" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1549443645.196" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1549554307.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1549554307.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1549554307.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1549554307.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1549554307.926" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1549568697.071" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1549568697.071" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1549568697.071" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1549568697.071" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1549568697.071" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1549592956.772" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1549592956.772" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1549592956.772" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1549592956.772" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1549592956.772" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1549593611.286" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1549593611.286" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1549593611.286" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1549593611.286" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1549593611.286" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
Operating System: Operating System :Deadlock :
786 views
0 votes
0 votes
We know that whenever a process needs i/o time it goes to block/wait state. At that time cpu is idle and it can run other processes. What happens during the deadlock ? In which state do the processes go, so that the cpu freezes ? If all the processes during deadlock, go into block state then why does the cpu freezes ? The cpu should stay idle, but it should not freeze . Can anyone clarify ?

1 Answer

0 votes
0 votes

For starters, all the processes going in a deadlock simultaneously, is a very very rare occurrence, at least on the CPUs our generation is used to. In fact its so rare that major names in the market, like Windows and Ubuntu, do not have any deadlock resolving mechanism at all. The ultimate solution is that the user gets frustrated and restarts the system.

But still, if a condition occurs wherein all the processes are in deadlock, then CPU goes in an idle state (as there is no process to execute) and its same as what we call as freezing or "hang". After some time, if one of the processes is killed the deadlock may be resolved and the system starts running again. But if one the process stuck in deadlock is of kernel type, the only solution is a total restart.$^{[1]}$

Also, there may be the case wherein not all, but only a few processes are in a deadlock. In that case, the CPU may be (in fact is) used by other processes. Its one of those moments when one of our application (say Chrome becomes unresponsive) while rest of the applications are running well and good.

Related questions


Deprecated: Implicit conversion from float-string "1548083153.034" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1548083153.034" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1548083153.034" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1548083153.034" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1534316777.835" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1534316777.835" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1534316777.835" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1534316777.835" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1533222546.733" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1533222546.733" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1533222546.733" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1533222546.733" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1527513936.786" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1527513936.786" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1527513936.786" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1527513936.786" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803
2.9k
views
3 answers
0 votes
mobashshir asked Aug 15, 2018
2,869 views
Assume a system with four resource types, C=(6,4,4,2), andthe maximum claim table below. The resource allocator isconsidering allocating resources according to the tableb...
257
views
0 answers
0 votes
aambazinga asked Aug 2, 2018
257 views
In the deadlock chapter, in resource allocation graph algorithm, it is given that detecting a cycle takes O(n^2) operations... But we can find cycle in O(n+m) operations,...
4.2k
views
1 answers
9 votes
Nancy Pareta asked May 28, 2018
4,240 views
The time complexity of banker's algorithm to avoid deadlock having $n$ processes and $m$ resources is?