Midterm - Quiz 2

12 Questions | Total Attempts: 52

SettingsSettingsSettings
Please wait...
Midterm - Quiz 2


Questions and Answers
  • 1. 
    A counting semaphore is functionally equivalent to a mutex lock because it provides a 0 or a 1 value to indicate mutual exclusion.
    • A. 

      True

    • B. 

      False

  • 2. 
    For thread scynchronization outside the kernel, Windows provides [Blank] . Using it, threads synchronize according to several different mechanisms, including mutex locks, semaphores, events, and timers. The system protects shared data by requiring a thread to gain ownership of a mutex to access the data and to release ownership when it is finished.
  • 3. 
    What are the two functions used when mutex locks? [Blank]  and [Blank]  (answer in according to the order of execution.)
  • 4. 
    Many modern computer systems therefore provide special hardware instructions that provides the solution to synchronization problem. The [Blank] operates on a single variable while the [Blank] on three variables.
  • 5. 
    There are no guarantees Peterson's solution works correctly on modern computer architectures.
    • A. 

      True

    • B. 

      False

  • 6. 
    The only operations that can be invoked on a condition variable are [Blank] and [Blank]. (answer in correct order of operation)
  • 7. 
    A spinlock is a type of mutex lock because the process loops while waiting for the lock to become available.
    • A. 

      True

    • B. 

      False

  • 8. 
    What is the term for describing the situation where shared data may be manipulated concurrently and the outcome of the execution depends upon the order of access? [Blank]
  • 9. 
    A nonpreemptive kernel is essentially free from race conditions.
    • A. 

      True

    • B. 

      False

  • 10. 
    How many writers may concurrently open the database with the readers-writers problem? [Blank] (answer in numeric form)
  • 11. 
    What is the term used to describe the segment of code where shared data is accessed and possibly manipulated? [Blank]
  • 12. 
    Linux uses spinlocks for both single and multiple processor systems.
    • A. 

      True

    • B. 

      False

Back to Top Back to top