[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Operating System :: Process Management - Discussion

Home > Operating System > Process Management > MCQs Questions Discussion

64 / 41

Choose the correct option.

Semaphore is used for

Asynchronization

Bdead-lock avoidance

Cbox

DNone of these

Answer: Option (Login/Signup)

Show Explanation

Any integer(non negative) can act as semaphore. Semaphores are used for counting tasks such as creating a critical region that allows a specified number of threads to enter. For example, if we want at most four threads to be able to enter a section, we could protect it with a semaphore and initialize that semaphore to four.The first four threads will be able to decrement the semaphore and enter the region, but at that point, the semaphore will be zero and any other thread will be blocked from outside the critical region until one of the current threads leaves and signals the semaphore.

Asked In :: Wipro Global Edge

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here