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?
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
Q32: Which of the following definitely indicates that
Q33: When a sleeping thread is interrupted, a(n)
Q34: _ occur(s) if the effect of multiple
Q35: a(n. _ object is used to control
Q36: Examine the SharedData class shown below.Suppose two
Q38: Calling signalAll without locking the object is
Q39: Suppose thread one is downloading a large
Q40: Calling the wait method in synchronized code
Q41: What happens if we try to start
Q42: When a sleeping thread is interrupted, an