logo

CuriousTab

CuriousTab

Discussion


Home Technical Questions Operating Systems See What Others Are Saying!
  • Question
  • How are the wait/signal operations for monitor different from those for semaphores?


  • Correct Answer
  • If a process in a monitor signal and no task is waiting on the condition variable, the signal is lost So this allows easier program design Whereas in semaphores, every operation affects the value of the semaphore, so the wait and signal operations should be perfectly balanced in the program 


  • More questions

    • 1. What are various scheduling queues?
    • Discuss
    • 2. What is the state of the processor, when a process is waiting for some event to occur?
    • Discuss
    • 3. What is Memory-Management Unit (MMU)?
    • Discuss
    • 4. SNOBOL is mainly used for

    • Options
    • A. Text Operation
    • B. String operations
    • C. List operations
    • D. Numerical operations
    • Discuss
    • 5. Convert the expression ((A + B) * C ? (D ? E) ^ (F + G)) to equivalent Prefix Notation
    • Discuss
    • 6. What would be the output of the following program? main() { char a[] = "Visual C++"; char *b = "Visual C++"; printf ("\n%d %d", sizeof (a), sizeof (b)); printf ("\n%d %d", sizeof (*a), sizeof (*b)); }
    • Discuss
    • 7. Point out the error, if any, in the following program. #include "stdarg.h" main() { display ( 4, 12.5, 13.5, 14.5, 44.3); } display(int num, ...) { float c; int j; va_list ptr; va_start (ptr, num); for ( j = 1; j <= num; j++) { c = va_arg ( ptr, float ); printf ("\n%f", c); } }
    • Discuss
    • 8. Two main measures for the efficiency of an algorithm are

    • Options
    • A. Time and Space
    • B. Complexity and Memory
    • C. Data and Space
    • D. Memory and Processor
    • Discuss
    • 9. Would the following program compile? main() { int a = 10, *j; void *k; J = k = &a; J++; k++; printf ("\n%u %u", j, k); }
    • Discuss
    • 10. What would be the output of the following program? main() { char ch ='A'; printf ("%d%d", sizeof (ch), sizeof ('A')); }
    • Discuss


    Comments

    There are no comments.

Enter a new Comment