Quiz 3 - Process Synchronization

8 Questions | Total Attempts: 93

SettingsSettingsSettings
Please wait...
Quiz 3 - Process Synchronization

.


Questions and Answers
  • 1. 
    Race conditions are prevented by requiring that critical regions be protected by locks.
    • A. 

      True

    • B. 

      False

  • 2. 
    A counting semaphore ____.
    • A. 

      Cannot be used to control access to a thread's critical sections

    • B. 

      Is essentially an integer variable

    • C. 

      Can be modified simultaneously by multiple threads

    • D. 

      Is accessed through only one standard operation

  • 3. 
    Mutex locks and counting semaphores are essentially the same thing.
    • A. 

      True

    • B. 

      False

  • 4. 
    A race condition ____.
    • A. 

      None of the above

    • B. 

      Will result only if the outcome of execution does not depend on the order in which instructions are executed

    • C. 

      Results when several threads try to access and modify the same data concurrently

    • D. 

      Results when several threads try to access the same data concurrently

  • 5. 
    What is the correct order of operations for protecting a critical section using a binary semaphore?
    • A. 

      Signal() followed by wait()

    • B. 

      Acquire() followed by release()

    • C. 

      Release() followed by acquire()

    • D. 

      Wait() followed by signal()

  • 6. 
    A mutex lock ______.
    • A. 

      Is exactly like a counting semaphore

    • B. 

      Is essentially a boolean variable

    • C. 

      Can be used to eliminate busy waiting

    • D. 

      Is not guaranteed to be atomic

  • 7. 
    The value of a counting semaphore can range only between 0 and 1.
    • A. 

      True

    • B. 

      False

  • 8. 
    A solution to the critical section problem does not have to satisfy which of the following requirements?
    • A. 

      Atomicity

    • B. 

      Bounded waiting

    • C. 

      Progress

    • D. 

      Mutual exclusion

Back to Top Back to top