Blog
18 Best File Compression Software | Zip | Unzip Program
Zip is an archive format that offers data compression without data loss. A zip file may contain...
A Livelock is a situation where a request for an exclusive lock is denied repeatedly, as many overlapping shared locks keep on interfering each other. The processes keep on changing their status, which further prevents them from completing the task. This further prevents them from completing the task.
In this operating system tutorial, you will learn:
Example 1:
An easiest example of Livelock would be two people who meet face-to-face in a corridor, and both of them move aside to let the other pass. They end up moving from side to side without making any progress as they move the same way at the time. Here, they never cross each other.
Example 2:
You can see in the above image, each of the two given processes needs two resources, and they use the primitive polling enter registry to try to acquire the locks necessary for them. If the attempt fails, the method works again.
Assuming, process A runs first and acquires data resource X and then process B runs and acquires resource Y, no matter which process runs first, none of them further progress.
However, neither of the two processes are blocked. They use up CPU resources repeatedly without any progress being made but also stop any processing block.
Therefore, this situation is not that of a deadlock because there is not a single process that is blocked, but we face the situation something equivalent to deadlock, which is LIVELOCK.
Livelock occurs when the total number of allowed processes in a specific system should be defined by the total number of entries in the process table. Therefore, process table slots should be referred to as Finite Resources.
A deadlock is a situation that occurs in OS when any process enters a waiting state because another waiting process is holding the demanded resource. Deadlock is a common problem in multi-processing where several processes share a specific type of mutually exclusive resource known as a soft lock or software.
Starvation is a situation where all the low priority processes got blocked, and the high priority processes proceed. In any system, requests for high/low priority resources keep on happening dynamically. Thereby, some policy is require to decide who gets support when.
Using some algorithms, some processes may not get the desired serviced even though they are not deadlocked. Starvation occurs when some threads make shared resources unavailable for a long period of time.
For example, an object offers a synchronized method which likely to take a long time to return. If one thread uses this method frequently, other threads that also need frequent synchronized access to the same object will often be blocked.
Zip is an archive format that offers data compression without data loss. A zip file may contain...
Video quality enhancers are tools that enable you to improve the resolution of a video. These...
Following are frequently asked questions in interviews for freshers as well as experienced Java...
What is Concurrency or Single Core? In Operating Systems, concurrency is defined as the ability of a...
What is Apache Solr? Apache Solr is an open-source search server platform written in Java language...
Video converter is used when you cannot open a video of a certain format. It is also used when you...