What is the purpose of a semaphore in Operating System?
Q1. What is the purpose of a semaphore in Operating System?
Answer: Process synchronization
Explanation: Semaphores are used for process synchronization, controlling access to shared resources by multiple processes.