User mode और Kernel mode के बीच switch होने में लगने वाला समय, दो processes के बीच switch होने में लगने वाले समय से ______ होता है।
(KVS PGT C.S. 2018)
Correct Answer: C
Explanation (EN): Time taken to switch between user and kernel modes is less than the time taken to switch between two processes.
Explanation (HI): User mode और Kernel mode के बीच switch होने में लगने वाला समय, दो processes के बीच switch होने में लगने वाले समय से कम होता है।
A semaphore एक integer variable है जिसे initialization के अलावा केवल निम्न में से किस standard atomic operation के द्वारा access किया जाता है?
(DSSSB TGT C.S. 07.02.2024 (Shift-II))
Correct Answer: D
Explanation (EN): A semaphore is a synchronization tool used in operating systems to control access to shared resources by multiple processes. It is an integer variable that can only be modified using atomic operations to prevent race conditions. signal() increases the semaphore value. If the result is non-positive, a waiting process is unblocked.
Explanation (HI): Semaphore operating system में shared resources के access को control करने के लिए उपयोग किया जाता है। इसे केवल atomic operations द्वारा modify किया जाता है ताकि race condition न हो। signal() semaphore की value बढ़ाता है। यदि परिणाम non-positive हो, तो waiting process unblock हो जाता है।
Deadlock Prevention की निम्न में से किस condition में कम-से-कम एक resource non-sharable होना चाहिए?
(DSSSB TGT C.S. 07.02.2024 (Shift-II))
Correct Answer: C
Explanation (EN): Mutual Exclusion means at least one resource must be non-sharable, that is, only one process can use it at a time. Example: a printer. If all resources were sharable, deadlock could not occur.
Explanation (HI): Mutual Exclusion condition में कम-से-कम एक resource non-sharable होना चाहिए, अर्थात एक समय में केवल एक process ही उसका उपयोग कर सकता है। उदाहरण: printer। यदि सभी resources sharable होते, तो deadlock नहीं होता।
______ में, एक thread तुरंत target thread को terminate कर देता है।
(DSSSB PGT C.S. (Male) 27.07.2018 (Shift-II))
Correct Answer: A
Explanation (EN): Thread cancellation is the process of terminating a thread before it finishes execution. In asynchronous cancellation, one thread immediately terminates the target thread without waiting for it to reach a safe point.
Explanation (HI): Thread cancellation का अर्थ है किसी thread को उसके execution पूरा होने से पहले समाप्त करना। Asynchronous cancellation में एक thread target thread को तुरंत terminate कर देता है, बिना safe point का इंतजार किए।
मान लें Pi और Pj दो processes हैं, R memory से read किए गए variables का set है और W memory में written variables का set है। Pi और Pj के concurrent execution के लिए निम्न में से कौन-सी condition true नहीं है?
(UGC NET C.S. June-2015 (Paper-II))
Correct Answer: C
Explanation (EN): Reading by two processes does not create any conflict. Therefore R(Pi) ∩ R(Pj) need not be empty, so this condition is not true.
Explanation (HI): दो processes द्वारा केवल reading करने से कोई conflict नहीं होता। इसलिए R(Pi) ∩ R(Pj) का खाली होना आवश्यक नहीं है। अतः यही condition true नहीं है।
Critical section problem के समाधान के लिए निम्न में से कौन-सी condition आवश्यक नहीं है?
(UGC NET C.S. December-2014 (Paper-II))
Correct Answer: C
Explanation (EN): In a correct solution to the critical section problem, processes outside the critical section should not block other processes. Hence this condition does not hold good.
Explanation (HI): Critical section problem के सही समाधान में जो process critical section के बाहर है, उसे अन्य processes को block नहीं करना चाहिए। इसलिए यह condition मान्य नहीं है।
Deadlock के बारे में निम्न statements पर विचार कीजिए: A. Resource-allocation graph में cycle होना deadlock को दर्शाता है। B. Wait-for graph में cycle होना deadlock को दर्शाता है। C. Mutual exclusion, hold and wait, no preemption और circular wait यदि एक साथ हों, तो deadlock हो सकता है। सही विकल्प चुनिए।
(NVS PGT C.S. 15.12.2022 (Shift-II))
Correct Answer: D
Explanation (EN): A cycle in a wait-for graph indicates deadlock. Also, if mutual exclusion, hold and wait, no preemption, and circular wait occur simultaneously, deadlock may occur. A cycle in a resource-allocation graph does not always indicate deadlock when there are multiple instances of resources.
Explanation (HI): Wait-for graph में cycle होना deadlock को दर्शाता है। साथ ही mutual exclusion, hold and wait, no preemption और circular wait एक साथ होने पर deadlock हो सकता है। Resource-allocation graph में cycle हमेशा deadlock नहीं दर्शाता, विशेषकर जब resources की multiple instances हों।
Threads में degree of concurrency को किस क्रम में व्यवस्थित किया जा सकता है?
(UGC NET C.S. December-2022)
Correct Answer: B
Explanation (EN): The correct arrangement of degree of concurrency from highest to lowest is One-to-one > many-to-many > many-to-one.
Explanation (HI): Concurrency की degree का सही क्रम highest से lowest तक One-to-one > many-to-many > many-to-one है।
निम्न में से किसका उपयोग उस system में किया जाता है जिसमें किसी resource type की multiple instances हों?
(DSSSB PGT C.S. (Male) 27.07.2018 (Shift-II))
Correct Answer: B
Explanation (EN): Banker's algorithm is a deadlock avoidance algorithm. It is used when there are multiple instances of a resource in a system.
Explanation (HI): Banker's algorithm एक deadlock avoidance algorithm है। इसका उपयोग तब किया जाता है जब system में किसी resource की multiple instances हों।
Database transactions के संदर्भ में 'wait-for graph' का उपयोग किसलिए किया जाता है?
(RPSC C.S. 2016 (Paper-II))
Correct Answer: D
Explanation (EN): A wait-for graph is used to detect deadlock. If the graph contains a cycle, then there is a deadlock.
Explanation (HI): Wait-for graph का उपयोग deadlock detect करने के लिए किया जाता है। यदि graph में cycle हो, तो deadlock मौजूद है।