A) the thread obtains a resource from the pool and decrements the semaphore to -1
B) the thread obtains a resource from the pool and the semaphore remains equal to 0
C) the thread must wait until a resource is returned to the pool by a V operation
D) the thread returns a resource to the pool and increments the semaphore to 1
Correct Answer
verified
Multiple Choice
A) access shared, modifiable data
B) run as quickly as possible
C) prevent the possibility of infinite loops
D) all of the above
Correct Answer
verified
Multiple Choice
A) giving one processor the job of controlling the ready list.
B) controlling access (via busy waiting) to a shared ready list.
C) both a and b
D) none of the above
Correct Answer
verified
Multiple Choice
A) an application that copies data from a fixed-size buffer to a CD-RW
B) a word processor that sends data to a buffer to be printed
C) both a and b
D) none of the above
Correct Answer
verified
Multiple Choice
A) The thread is allowed to enter its critical section and S is decremented.
B) The thread is blocked and added to a queue of waiting threads.
C) The semaphore is set to 2.
D) none of the above
Correct Answer
verified
Multiple Choice
A) Only one thread at a time can execute the instructions in its critical section for a particular resource.
B) If one thread is already in its critical section, another thread must wait for the executing thread to exit its critical section before continuing.
C) Once a thread has exited its critical section, a waiting thread may enter its critical section.
D) All threads must wait whenever any critical section is occupied.
Correct Answer
verified
Multiple Choice
A) if...else
B) do...while
C) try...catch
D) switch
Correct Answer
verified
Multiple Choice
A) synchronously
B) in parallel
C) asynchronously
D) simultaneously
Correct Answer
verified
Multiple Choice
A) P and V operations should be indivisible operations.
B) If several threads attempt a P( S ) operation simultaneously, only one thread should be allowed to proceed.
C) A semaphore implementation should guarantee that threads do not suffer indefinite postponement.
D) all of the above
Correct Answer
verified
Multiple Choice
A) asynchronism
B) serialization
C) protection
D) mutual exclusion
Correct Answer
verified
Multiple Choice
A) Dekker's algorithm
B) Peterson's algorithm
C) Lamport's algorithm
D) both a and b
Correct Answer
verified
Multiple Choice
A) to protect access to a critical section
B) to notify the process that an event has occurred
C) to prevent shared variables from getting corrupted
D) to synchronize two or more concurrent threads
Correct Answer
verified
Multiple Choice
A) lockstep synchronized
B) deadlocked
C) busy waiting
D) indefinitely postponed
Correct Answer
verified
Multiple Choice
A) prevents deadlock
B) prevents indefinite postponement
C) eliminates the possibility that a thread is preempted between reading a value from a memory location and writing a new value to the memory location
D) none of the above
Correct Answer
verified
Multiple Choice
A) primitive
B) lock
C) controller
D) flag
Correct Answer
verified
Multiple Choice
A) The solution is implemented purely in software on a machine without specially designed mutual exclusion machine-language instructions.
B) No assumption can be made about the relative speeds of asynchronous concurrent threads.
C) A thread that is executing instructions outside its critical section cannot prevent any other threads from entering their critical sections.
D) A thread must not be indefinitely postponed from entering its critical section.
Correct Answer
verified
Multiple Choice
A) a large number of shared variables
B) complicated loops
C) that any operations occur atomically
D) all of the above
Correct Answer
verified
Multiple Choice
A) waiting, ready
B) blocked, waiting
C) running, waiting
D) ready, running
Correct Answer
verified
Multiple Choice
A) is a viable solution for mutual exclusion in a multiprocessor system
B) on a uniprocessor system could result in an infinite loop causing the system to hang
C) typically prevents a thread from being preempted while accessing shared data
D) both b and c
Correct Answer
verified
Multiple Choice
A) Lockstep synchronization
B) Deadlock
C) Busy waiting
D) Indefinite postponement
Correct Answer
verified
Showing 1 - 20 of 26
Related Exams