Multiple Choice
Assume the binary variable lock is initialized to be 0, which of the following can be an implementation of the entry section to solve the critical-section problem?
A) while (compare and swap(&lock, 0, 1) != 0) , do nothing;
B) while (test and set(&lock) ) , do nothing;
C) both A and B
D) none of the above
Correct Answer:

Verified
Correct Answer:
Verified
Q39: In _, the process requests permission to
Q40: Explain two general approaches to handle critical
Q41: A monitor is an abstract data type
Q42: The value of a counting semaphore can
Q43: CAS-based synchronization is always faster than traditional
Q45: Race conditions can result in corrupted values
Q46: Which of the following are efforts to
Q47: A mutex lock is released immediately after
Q48: What three conditions must be satisfied in
Q49: Which of the following is true for