Multiple Choice
The term "stale data" refers to a situation in multi-CPU machines when one thread modifies shared data and a second thread accesses that data later, but sees the data value before the change took place. What is required to guarantee that the second thread sees the updated data, not stale data when access to the shared data occurs in two different methods?
A) One method needs to acquire then release the lock after modifying the data.
B) Both methods need to acquire then release the lock after modifying or reading the data.
C) Never change any shared object data in multi-CPU machines.
D) Never use locks for any shared data in multi-CPU machines.
Correct Answer:

Verified
Correct Answer:
Verified
Q22: If a thread sleeps after acquiring a
Q23: a(n. _ uses a small number of
Q24: Consider the addFirst method of the LinkedList
Q25: Assume two threads share a BankAccount object
Q26: The sleep method is terminated with a(n)
Q28: Given that a new thread named t
Q29: Which of the following does not create
Q30: What happens when a thread calls the
Q31: Suppose thread one is downloading a 800KB
Q32: Which of the following definitely indicates that