मान लें किसी system में A से G तक सात processes और R से W तक छह resources हैं। Resource ownership दिया गया है। क्या system deadlocked है? यदि हाँ, तो कौन-से processes deadlocked हैं?
(UGC NET C.S. August-2016 (Paper-II))
Correct Answer: C
Explanation (EN): The system is deadlocked due to processes D, E, and G.
Explanation (HI): System में D, E और G processes के कारण deadlock है।
मान लें किसी system में Resource R की 12 instances हैं और चार processes execute हो रही हैं। प्रत्येक process की maximum need और current allocation दिए गए हैं। Current allocation के आधार पर क्या system safe है? यदि हाँ, तो safe sequence क्या है?
(UGC NET C.S. June-2016 (Paper-II))
Correct Answer: C
Explanation (EN): Remaining need is P1=5, P2=5, P3=3, P4=2 and available resources are 2. First P4 can finish, then P3, then P1, and finally P2. Hence the safe sequence is P4, P3, P1, P2.
Explanation (HI): Remaining need P1=5, P2=5, P3=3, P4=2 है और available resources 2 हैं। पहले P4 finish कर सकता है, फिर P3, उसके बाद P1 और अंत में P2। इसलिए safe sequence P4, P3, P1, P2 है।
एक computer system में 7 tape drives हैं। उनके लिए 'n' processes compete कर रही हैं। प्रत्येक process को 2 tape drives की आवश्यकता हो सकती है। 'n' का अधिकतम मान क्या होगा ताकि system guaranteed deadlock free रहे?
(DSSSB TGT C.S. 07.08.2021 (Shift-I))
Correct Answer: B
Explanation (EN): Each process may need at most 2 drives. To guarantee deadlock freedom, the system must always be able to satisfy at least one process completely. Thus 2n ≤ 7, so n ≤ 3.
Explanation (HI): प्रत्येक process को अधिकतम 2 drives चाहिए। Deadlock freedom की guarantee के लिए system को कम-से-कम एक process की पूरी आवश्यकता हमेशा पूरी करने योग्य होना चाहिए। इसलिए 2n ≤ 7, अतः n ≤ 3।
Semaphores के संदर्भ में wait() और signal() functions के valid code वाला विकल्प चुनिए।
(HTET PGT C.S. 2022)
Correct Answer: B
Explanation (EN): In semaphore operations, wait() decrements the semaphore after checking availability, and signal() increments the semaphore. Therefore option (b) gives the valid code.
Explanation (HI): Semaphore operations में wait() उपलब्धता जाँचने के बाद semaphore की value घटाता है और signal() उसकी value बढ़ाता है। इसलिए option (b) सही code देता है।
निम्न में से कौन-सी valid deadlock prevention scheme नहीं है?
(HTET PGT C.S. 2020)
Correct Answer: C
Explanation (EN): Options (a), (b), and (d) are valid deadlock prevention methods because they break necessary deadlock conditions. Option (c) is not a standard deadlock prevention scheme.
Explanation (HI): Options (a), (b) और (d) deadlock prevention की valid methods हैं क्योंकि ये deadlock की आवश्यक conditions को तोड़ती हैं। Option (c) कोई standard deadlock prevention scheme नहीं है।
निम्न में से कौन-सा Operating System में synchronization से संबंधित नहीं है?
(HTET PGT C.S. 2019)
Correct Answer: D
Explanation (EN): Bounded Buffer, Readers-Writers, and Dining Philosophers are classic synchronization problems. Belady's Anomaly is related to page replacement, not synchronization.
Explanation (HI): Bounded Buffer, Readers-Writers और Dining Philosophers classic synchronization problems हैं। Belady's Anomaly page replacement से संबंधित है, synchronization से नहीं।
निम्न में से कौन-सी deadlock के लिए आवश्यक condition नहीं है?
(HTET PGT C.S. 2018)
Correct Answer: B
Explanation (EN): The required conditions for deadlock are mutual exclusion, hold and wait, no preemption, and circular wait. Therefore preemptive is not required.
Explanation (HI): Deadlock की आवश्यक conditions हैं mutual exclusion, hold and wait, no preemption, और circular wait। इसलिए preemptive आवश्यक condition नहीं है।
Multi-threaded process के प्रत्येक thread के लिए अलग क्या होता है?
(CGPSC C.S. 2020 Set-A)
Correct Answer: C
Explanation (EN): All threads of a process share code, data, files, and address space, but each thread has its own user and kernel stack.
Explanation (HI): किसी process के सभी threads code, data, files और address space share करते हैं, लेकिन प्रत्येक thread का अपना अलग user और kernel stack होता है।
Semaphores का उपयोग किस problem को solve करने के लिए किया जाता है?
(CGPSC C.S. 2020 Set-A)
Correct Answer: C
Explanation (EN): As per the given answer key, semaphores are used for mutual exclusion, i.e. ensuring that only one process/thread accesses the critical section at a time.
Explanation (HI): दिए गए answer key के अनुसार semaphores का उपयोग mutual exclusion के लिए किया जाता है, अर्थात एक समय में केवल एक process/thread critical section में प्रवेश करे।
Multiple processes की तुलना में multiple threads के advantages क्या हैं? (i) Creation में कम समय (ii) Termination में कम समय (iii) Switching में कम समय (iv) Threads के बीच communication में kernel शामिल नहीं होता
(CGPSC C.S. 2020 Set-A)
Correct Answer: D
Explanation (EN): Threads are lighter than processes. They require less time for creation, termination, and switching, and communication among threads is more efficient as they share the same address space.
Explanation (HI): Threads, processes की तुलना में हल्के होते हैं। इन्हें बनाने, समाप्त करने और switch करने में कम समय लगता है, तथा threads के बीच communication अधिक efficient होता है क्योंकि वे same address space share करते हैं।