Multiple Choice
Stale data occurs 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?
A) The second thread should not try to acquire the lock.
B) The first thread should not try to acquire the lock.
C) Neither thread should use locks.
D) The first thread should release the lock after changing the data.
Correct Answer:

Verified
Correct Answer:
Verified
Q3: The _ method is useful only if
Q23: a(n. _ uses a small number of
Q41: Consider the addFirst method of the LinkedList
Q42: When a sleeping thread is interrupted, an
Q43: The Runnable interface includes which method(s)?<br>I public
Q44: Examine the SharedData class shown below. Suppose
Q47: For threads of equal priority, which is
Q48: Suppose that the class XYZ implements the
Q50: Which argument(s) present(s) the best case(s) for
Q51: In which method are the tasks that