Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Following explanation actually explains how wait() and signal() of monitor differ from P and V of semaphore. </p> <p>The <strong>wait()</strong> and <strong>signal()</strong> operations on condition variables in a <strong>monitor</strong> are similar to <strong>P</strong> and <strong>V</strong> operations on counting <strong>semaphores</strong>. </p> <p><strong>A wait statement</strong> can block a process's execution, while a <strong>signal statement</strong> can cause another process to be unblocked. However, there are some <strong>differences</strong> between them. When a process executes a P operation, it does not necessarily block that process because the counting semaphore may be greater than zero. In contrast, when a wait statement is executed, it always blocks the process. When a task executes a V operation on a semaphore, it either unblocks a task waiting on that semaphore or increments the semaphore counter if there is no task to unlock. On the other hand, if a process executes a signal statement when there is no other process to unblock, there is no effect on the condition variable. Another difference between semaphores and monitors is that users awaken by a V operation can resume execution without delay. Contrarily, users awaken by a signal operation are restarted only when the monitor is unlocked. In addition, a monitor solution is more structured than the one with semaphores because the data and procedures are encapsulated in a single module and that the mutual exclusion is provided automatically by the implementation. </p> <p>Link: <a href="http://wiki.answers.com/Q/What_is_basic_difference_between_semaphore_and_monitor_in_operating_system" rel="noreferrer">here</a> for further reading. Hope it helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload