CS FundamentalsHardGATE CS
Which statement about the difference between an unsafe state and a deadlocked state (Banker's algorithm) is correct?
- A. An unsafe state is always a deadlock, only one that is detected earlier
- B. An unsafe state may lead to deadlock, but processes may still all finish
- C. A safe state can still deadlock if later requests arrive in a bad order
- D. Unsafe and deadlocked mean the same thing when there is one resource type
Correct answer: B. An unsafe state may lead to deadlock, but processes may still all finish
Safe means some order lets everyone finish even if all claim their maxima. Unsafe means that guarantee is lost, but if processes ask for less than their declared maximum they may still complete. Deadlock is a subset of unsafe.
More Operating Systems questions
- A 32-bit system uses segmentation with paging. A logical address is (segment s, offset d) with d of 32 bits; within a segment, d is split…
- A thread library offers only kernel-level threads (one-to-one). Which change makes thread creation and switching cheapest without losing…
- A program creates threads with for (i = 0; i < 4; i++) pthreadcreate(&t[i], NULL, work, &i); and each thread reads arg as its index. What…
- In a directory, ln data h and ln -s data s are run, and then mv data data2 renames the original within the same file system. What happens…
- What does it mean that the read() system call on a terminal is 'blocking', and what state does the process enter while no input is…
- Which statement about thrashing and the degree of multiprogramming is correct?