Operating Systems

Question #168

Read the question, compare the options, and review the correct answer below.

CS604 · Final-term only#168

Which of the following is correct definition for wait operation?

  1. A
    ? wait(S) { (Page 111)
    while(S<=0)
    ;// no op
    S--;
    }
  2. B
    ? wait(S) {
    S++;
    }
  3. C
    ? wait(S) {
    while(S>=0)
    ;// no op
    S--;
    }
  4. D
    ? wait(S) {
    S--;
    }
Show correct answer

Correct answer: A. ? wait(S) { (Page 111)
while(S<=0)
;// no op
S--;
}

Check community answers against your course notes.
← More practice questionsTake a timed test