Question

1.
2.
3.
4.
Answer (Detailed Solution Below)

Option 2 : Exactly two processes / ठीक दो प्रक्रियाओं के लिए

Advertisement

Detailed Solution

सही उत्तर Exactly two processes / ठीक दो प्रक्रियाओं के लिए है।

Key Points
Helpful?
PrepSnapprepsnap.in • Part -A

Question:

Peterson's solution to the critical-section problem guarantees mutual exclusion, progress and bounded waiting for: / क्रांतिक-खंड (critical-section) समस्या का पीटरसन समाधान पारस्परिक अपवर्जन, प्रगति और परिबद्ध प्रतीक्षा की गारंटी देता है:

1.
Any number of processes / कितनी भी प्रक्रियाओं के लिए
2.
Exactly two processes / ठीक दो प्रक्रियाओं के लिए
3.
Only kernel-level threads / केवल कर्नेल-स्तरीय थ्रेडों के लिए
4.
Only processes sharing a semaphore / केवल सेमाफोर साझा करने वाली प्रक्रियाओं के लिए

Correct Answer: Exactly two processes / ठीक दो प्रक्रियाओं के लिए

The classic Peterson's solution uses two shared variables (flag[2], turn) and is correct for exactly two processes. For n processes it must be generalized (e.g., the filter lock / tournament tree). It is a software-only solution needing no special hardware instructions. / क्लासिक पीटरसन समाधान दो साझा चरों (flag[2], turn) का प्रयोग करता है और ठीक दो प्रक्रियाओं के लिए सही है। n प्रक्रियाओं हेतु इसे व्यापकीकृत करना पड़ता है (जैसे फिल्टर लॉक / टूर्नामेंट ट्री)। यह पूर्णतः सॉफ्टवेयर समाधान है — विशेष हार्डवेयर निर्देशों की आवश्यकता नहीं।

Downloaded from PrepSnap (prepsnap.in)