[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

56 / 41

Choose the correct option.

Semaphores function is to

Asynchronize critical resources to prevent deadlock

Bsynchronize processes for better CPU utilization

Cused for memory management

Dnone of above

Answer: Option (Login/Signup)

Show Explanation

Semaphores are synchronization tools.

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 :: Cisco Societe Generale

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here