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 |
Is 64gb ram enough for gaming?
Do 32 bit programs run faster on 64bit?
What are the different types of kernel?
What is the basic difference between pre-emptive and non-pre-emptive scheduling.
What is chkdsk command?
How many os can be installed in a pc?
Can you move your program files to another drive?
What does echo $$ do?
How do I search for a file?
What kind of operations are possible on a semaphore?
Critical section is?
Why is 64 bit called x86?