Starvation occurs when a single thread is perpetually denied access to a shared resource or lock.
Livelock occurs when two or more threads are conceptually blocked forever, although they are still active and trying to complete their task.
But the questions says "you observe that the lower priority threads rarely get a chance to run".
Doesn't this make the answer Livelock, since there are several threads unable to run, rather than being Starvation which relates to a single thread?
About Question enthuware.ocpjp.v8.2.1125 :
Moderator: admin
-
- Posts: 4
- Joined: Sat Mar 05, 2016 2:15 pm
- Contact:
-
- Site Admin
- Posts: 10053
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1125 :
No, the answer is correct. All of the three situations i.e. starvation, livelock, and deadlock involve multiple threads. In starvation, a single thread (out of multiple) is starved. In a livelock, multiple threads get to run again and again but none of them is able to complete their job for lack of one resource or the other.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 33 guests