what kind of problem is the application suffering?

Sam has designed an application. It segregates tasks that are critical and executed frequently
from tasks that are non critical and executed less frequently. He has prioritized these tasks based
on their criticality and frequency of execution. After close scrutiny, he finds that the tasks designed
to be non critical are rarely getting executed.
From what kind of problem is the application suffering?

Sam has designed an application. It segregates tasks that are critical and executed frequently
from tasks that are non critical and executed less frequently. He has prioritized these tasks based
on their criticality and frequency of execution. After close scrutiny, he finds that the tasks designed
to be non critical are rarely getting executed.
From what kind of problem is the application suffering?

A.
race condition

B.
starvation

C.
deadlock

D.
livelock

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.
Reference: The Java Tutorial, Starvation and Livelock



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Tim

Tim

The answer is B – the explanation is great and it is just for starvation!

Charles

Charles

Should be B

l0c

l0c

Correct answer is indeed B: Starvation.

Starvation occurs when threads with higher priority are always ran, leaving the threads with lower priority in the queue. They’re never run.