1Z0-804 · Question #103
Sam has designed an application. It segregates tasks that are critical and executed frequently from tasks thatare non critical and executed less frequently. He has prioritized these tasks based on…
The correct answer is B. starvation. Starvation describes a situation where a thread is unable to gain regular access to sharedresources and is unable to make progress. This happens when shared resources are made unavailable forlong periods by "greedy" threads. For example, suppose an object provides a…
Question
Sam has designed an application. It segregates tasks that are critical and executed frequently from tasks thatare non critical and executed less frequently. He has prioritized these tasks based on their criticality andfrequency of execution. After close scrutiny, he finds that the tasks designed to be non critical are rarely gettingexecuted. From what kind of problem is the application suffering?
Options
- Arace condition
- Bstarvation
- Cdeadlock
- Dlivelock
How the community answered
(37 responses)- A5% (2)
- B78% (29)
- C3% (1)
- D14% (5)
Explanation
Starvation describes a situation where a thread is unable to gain regular access to sharedresources and is unable to make progress. This happens when shared resources are made unavailable forlong periods by "greedy" threads. For example, suppose an object provides a synchronized method that oftentakes a long time to return. If one thread invokes this method frequently, other threads that also need frequentsynchronized access to the same object will often be blocked.
Topics
Community Discussion
No community discussion yet for this question.