Microsoft Certified Systems Engineer (MCSE) Question:

Download Job Interview Questions and Answers PDF

What is Semaphore? What is deadlock?

MCSE Interview Question
MCSE Interview Question

Answer:

Semaphore is synchronization tool to solve critical-section problem, can be used to control access to the critical section for a process or thread. The main disadvantage (same of mutual-exclusion) is requiring busy waiting. It will create problems in a multiprogramming system, where a single CPU is shared among many processes.

Busy waiting wastes CPU cycles.

Deadlock is a situation when two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes. The implementation of a semaphore with a waiting queue may result in this situation.

Download MCSE Interview Questions And Answers PDF

Previous QuestionNext Question
What is a router? What is a gateway?Explain the layered aspect of a UNIX system. What are the layers? What does it mean to say they are layers?