1Z0-805 · Question #84
What statement is true about thread starvation?
The correct answer is A. Thread "A" is said to be starved when it is frequently unable to gain access to a resource that it. Starvation describes a situation where a thread is unable to gain regular access to shared resources and is unable to make progress. This happens when shared resources are made unavailable for long periods by "greedy" threads. For example, suppose an object provides a…
Question
What statement is true about thread starvation?
Options
- AThread "A" is said to be starved when it is frequently unable to gain access to a resource that it
- BThread "A" is said to be starved when it is blocked waiting for Thread "13," which in turn waiting
- CStarvation can occur when threads become so busy responding to other threads that they move
- DWhen some of the processors in a multi-processor environment go offline and the live thread(s)
How the community answered
(23 responses)- A74% (17)
- B13% (3)
- C4% (1)
- D9% (2)
Explanation
Starvation describes a situation where a thread is unable to gain regular access to shared resources and is unable to make progress. This happens when shared resources are made unavailable for long periods by "greedy" threads. For example, suppose an object provides a synchronized method that often takes a long time to return. If one thread invokes this methodfrequently, other threads that also need frequent synchronized access to the same object will often be blocked.
Topics
Community Discussion
No community discussion yet for this question.