0 votes 0 votes Semaphore are used to the problem process synchronisation or mutual exclusion???? Answer is mutual exclusion given...is right?????? Operating System databases + – Harikesh Kumar asked May 18, 2017 • retagged Aug 5, 2017 by Arjun Harikesh Kumar 514 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Angkit commented May 18, 2017 reply Follow Share To achieve synchronization ,mutual exclusion must be satisfied. 1 votes 1 votes pawan kumarln commented May 18, 2017 reply Follow Share https://gateoverflow.in/19489/isro2015-30 2 votes 2 votes Please log in or register to add a comment.
2 votes 2 votes Semaphore are used in case of all mentioned below: 1. in process synchronization 2. mutual exclusion of processes 3. to avoid race condition and any other answers are just not correct due to ambiguous que asked, just challenge it. plz follow this link: https://gateoverflow.in/19489/isro2015-30 read discussion of this que bet arjun sir and all the seniors.. you will understand. thank you! too_simple answered May 22, 2017 too_simple comment Share Follow See 1 comment See all 1 1 comment reply sandeep007734 commented May 27, 2017 reply Follow Share In addition to the above answer, Semaphore is typically used where there are more than one resource which can be used. Sema_init(n) can be used to specify the number of resources 'n' in the system and then P() decreases this by 1 and V() increases it by 1. When there are no resources used, V() instruction does not have any effect on the semaphore lock. However if the count is 0 and then someone executes a P() on that, it gets blocked and is awaken when someone calls V(). 0 votes 0 votes Please log in or register to add a comment.