Question
Option 4 : A binary semaphore may be signaled by a thread other than the one that waited, while a mutex should be released by its owner / बाइनरी सेमाफोर प्रतीक्षा करने वाले के अलावा अन्य थ्रेड भी सिग्नल कर सकता है, जबकि म्यूटेक्स उसके स्वामी को ही छोड़ना चाहिए
Detailed Solution
सही उत्तर A binary semaphore may be signaled by a thread other than the one that waited, while a mutex should be released by its owner / बाइनरी सेमाफोर प्रतीक्षा करने वाले के अलावा अन्य थ्रेड भी सिग्नल कर सकता है, जबकि म्यूटेक्स उसके स्वामी को ही छोड़ना चाहिए है।
Question:
A multithreaded ticket-booking server protects its seat counter. Which statement about the synchronization primitives is correct? / एक मल्टीथ्रेडेड टिकट-बुकिंग सर्वर अपने सीट काउंटर की रक्षा करता है। सिंक्रोनाइज़ेशन प्रिमिटिव के बारे में कौन सा कथन सही है?
Correct Answer: A binary semaphore may be signaled by a thread other than the one that waited, while a mutex should be released by its owner / बाइनरी सेमाफोर प्रतीक्षा करने वाले के अलावा अन्य थ्रेड भी सिग्नल कर सकता है, जबकि म्यूटेक्स उसके स्वामी को ही छोड़ना चाहिए
Semaphores have no ownership rule, so any thread can signal one, whereas a mutex is conceptually owned by the locking thread and must be unlocked by that same thread. / सेमाफोर में स्वामित्व नियम नहीं होता, इसलिए कोई भी थ्रेड उसे सिग्नल कर सकता है, जबकि म्यूटेक्स लॉक करने वाले थ्रेड के स्वामित्व में होता है और उसी थ्रेड को अनलॉक करना चाहिए।