6
$\begingroup$

i have 4 question regarding relation between starvation and bounded waiting.

1.Does starvation-freedom imply deadlock-freedom?

My Answer-:

From here,

definition of starvation free is

Freedom from Starvation -:Every thread that attempts to acquire the lock eventually succeeds

Freedom from Deadlock -:f some thread attempts to acquire the lock, then some thread (not necessarily the thread referred to in the if statement; emphasis added) will succeed in acquiring the lock.

so i can state that starvation-freedom imply deadlock-freedom

2.Does starvation-freedom imply bounded-waiting?

Approach-:

Starvation free implies that every thread that will attempt to acquire lock will succeed.

on the other hand

bounded wait insures that there exists a bound, or limit, on the number of times other processes are allowed to enter their critical sections after a process has made request to enter its critical section and before that request is granted

which implies that there must not be any starvation.

Am i correct? but the explanation is here confuses me.

Please help me out !!

Thanks!!!

$\endgroup$
3
$\begingroup$

No, starvation-free doesn't imply bounded waiting.

For instance, consider a procedure that never even attempts to acquire any lock; but the amount of time it takes is variable and can be arbitrarily long. Then there is no bound on the amount of time it might take to complete its operation.

Here is another example of how it can fail. Starvation-free means that every attempt to acquire the lock eventually succeeds -- but that says nothing about how long it might take. Maybe the amount of time it will take to acquire the lock is variable and can be arbitrarily long -- there is no upper bound on how long it takes to acquire the lock. Then a procedure that first attempts to acquire the lock before doing anything else won't satisfy bounded waiting.

$\endgroup$
  • $\begingroup$ Very helpful. Thanks. Is there any relationship between progress and starvation? According to me there is no relationship. Want to confirm.. $\endgroup$ – Mr. Sigma. Nov 15 '18 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.