What is semaphore in operating system?

1 answer

Answer

1281490

2026-03-01 11:40

+ Follow

Semaphores are devices used to help with synchronization. If multiple processes share a common resource, they need a way to be able to use that resource without disrupting each other. You want each process to be able to read from and write to that resource uninterrupted.

A semaphore will either allow or disallow access to the resource, depending on how it is set up. One example setup would be a semaphore which allowed any number of processes to read from the resource, but only one could ever be in the process of writing to that resource at a time.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.