How are the wait/signal operations for monitor different from those for semaphores?



How are the wait/signal operations for monitor different from those for semaphores?..

Answer / Satvir Singh

In Java, the wait() and notify() methods are used for synchronization in a Monitor (a concurrency control mechanism). They're associated with an object's intrinsic lock. On the other hand, semaphores use wait() and signal() to block a thread when the resource it needs is unavailable, and to resume the thread once the resource becomes available. While both are used for synchronization, they operate at different levels and have slightly different functionality.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Operating Systems General Concepts Interview Questions

Is 64gb ram enough for gaming?

1 Answers  


Do 32 bit programs run faster on 64bit?

1 Answers  


What are the different types of kernel?

1 Answers  


What is the basic difference between pre-emptive and non-pre-emptive scheduling.

1 Answers  


What is chkdsk command?

1 Answers  


How many os can be installed in a pc?

1 Answers  


Can you move your program files to another drive?

1 Answers  


What does echo $$ do?

1 Answers  


How do I search for a file?

1 Answers  


What kind of operations are possible on a semaphore?

1 Answers  


Critical section is?

2 Answers   Patni, Wipro,


Why is 64 bit called x86?

1 Answers  


Categories