What is deadlock What is starvation How do they differ from

What is deadlock? What is starvation? How do they differ from each other?

Solution

Please follow the data and description :

Deadlock :

In the stream of computing and computer sciences, a deadlock refers to a state in which each process or a operation of a group of actions, that is waiting for the other members or the operations to release a lock on the data or the operation. This is basically a common problem in the multiprocessing systems, parallel computing, and the respective distributed systems, where the software and hardware locks are used to handle the shared resources and implement process synchronization and to avoid the deadlocks.

A deadlock occurs when a process or thread enters a waiting state because a requested system resource is held by another waiting process, which in turn is waiting for another resource held by another waiting process. If a process is unable to change its state indefinitely because the resources requested by it are being used by another waiting process, then the system is said to be in a deadlock.


Starvation :

In the stream of computer science, the concept of starvation is a problem encountered in concurrent computing where a process is perpetually denied necessary resources to process its work. This may be caused by the errors in a scheduling or mutual exclusion algorithm, but can also be caused by resource leaks, and can be intentionally caused via a denial-of-service attack.

Differences :


The main difference between the deadlock and starvation is the cause and effect relationship between them. The deadlock is the case that causes the concept of starvation. The other difference between deadlock and starvation is that deadlock is a problem while starvation can, sometimes, help to get out from a deadlock.

In deadlock, the two threads or processes will wait for each other and both do not proceed forward. But in the process of starvation, when two or more threads or processes wait for the same resource, one will roll back and let the others use the resource first and next the starving thread or process will try again . Therefore, all threads or processes will anyhow proceed forward.


In a simple way A deadlock causes starvation, but starvation does not cause a deadlock.


Hope this is hellpful.

What is deadlock? What is starvation? How do they differ from each other?SolutionPlease follow the data and description : Deadlock : In the stream of computing

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site