Computer AwarenessVery hardIBPS SO IT Officer
Four processes share identical units of one resource, and each may need up to 3 units at once. What is the least number of units that guarantees no deadlock?
- A. 8
- B. 12
- C. 10
- D. 9
Correct answer: D. 9
Worst case: each holds 2 units and waits for one more, using 4 × 2 = 8. One extra unit lets someone finish, so n(k − 1) + 1 = 4 × 2 + 1 = 9 units suffice.
हिंदी में
चार प्रक्रियाएँ एक संसाधन की समान इकाइयाँ साझा करती हैं, और प्रत्येक को एक साथ अधिकतम 3 इकाइयाँ चाहिए हो सकती हैं। डेडलॉक न होने की गारंटी देने वाली न्यूनतम इकाइयाँ कितनी हैं?
- A. 8
- B. 12
- C. 10
- D. 9
उत्तर: D. सबसे खराब स्थिति: प्रत्येक के पास 2 इकाइयाँ हैं और एक और की प्रतीक्षा है, जिनमें 4 × 2 = 8 लगीं। एक अतिरिक्त इकाई किसी को पूरा होने देती है, इसलिए n(k − 1) + 1 = 4 × 2 + 1 = 9 इकाइयाँ पर्याप्त हैं।
More Computer Awareness questions
- A counting semaphore starts at 7. Then 20 wait (P) operations and 15 signal (V) operations are performed on it. What is its final value?
- Which of these is NOT one of the three requirements a correct critical-section solution must meet?
- How does a microkernel operating system differ from a monolithic one?
- In the many-to-one threading model (many user-level threads mapped to one kernel thread), what happens when one thread makes a blocking…
- The main purpose of multiprogramming in an operating system is to:
- Which file-allocation method allows fast direct access to any block but suffers from external fragmentation?