About Question enthuware.ocpjp.v8.2.1125 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
philcave
Posts: 4
Joined: Sat Mar 05, 2016 2:15 pm
Contact:

About Question enthuware.ocpjp.v8.2.1125 :

Post by philcave »

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?

admin
Site Admin
Posts: 10053
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1125 :

Post by admin »

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests