Questions tagged [livelock]
29 questions
1
vote
1 answer
What is livelock exactly? In SQL when/how does it happen? Anything T-SQL developer can do to avoid it?
I have encountered this jargon for SQL Server, I am just not able to understand what it is exactly it happens in SQL Server. I am looking at some SQL Server example where it occurs...
I have been searching on google but all keep getting is 2 people…

Pritesh
- 1,938
- 7
- 32
- 46
0
votes
1 answer
Difference between starvation, livelock, deadlock
Is this table a correct way to summarize difference between starvation, livelock and deadlock?
Mainly I am asking about "thread is active", "how many threads", "nr of resources / locks" columns correctness
thread is active
how many threads
nr…

bridgemnc
- 189
- 1
- 2
- 11
0
votes
0 answers
Explanation and Code Example of a Livelock
I'm having a hard time understanding livelock.
For example, is this a livelock?
// Task 1
void task1() {
// Wait for event A with a timeout
while (getEventUntil(A, 1000)) {
// Fill the buffer
fillBuf();
// Set event B
…

d4mb
- 33
- 6
0
votes
0 answers
Can Livelock happen Without Starvation?
I have read that Livelock is special case of Resource Starvation here. I have also read that in Livelock Process are not in a waiting state here.
A/c to Galvin Book on OS, Starvation is Process waiting indefinitely, be it for acquiring resource or…

sgoel
- 1
0
votes
1 answer
Rails asset_path hangs in IntegrationTest
In an .html.erb file, I have
> and it works fine on the page. I have an integration test that renders this ERB file, and when it gets to rendering that line, the test hangs and the processor usage goes to 100%…

lmat - Reinstate Monica
- 7,289
- 6
- 48
- 62
0
votes
1 answer
Why liveness failure does not occur in single-threaded program?
I have been reading Java Concurrency in Practice. I have seen one statement that says :
Liveness failure such as deadlock, livelock or starvation do not occur in single-threaded programs.
However, let us see an example. If single-threaded app…

Farruh Habibullaev
- 2,342
- 1
- 26
- 33
0
votes
1 answer
Livelock and suppressed asynchrony
Encountered interesting livelock situation that has to do with asynchrony.
Consider the code below that causes livelock and executes for 1 minute even though useful payload takes almost nothing to run. The reason for execution time to be around 1…

Eugene D. Gubenkov
- 5,127
- 6
- 39
- 71
0
votes
1 answer
Blocks and do-while loop in objective-c
I have a Problem working with Blocks in Objective-C. My Problem is, that the completion block from the function readDataFromCharactUUID is never called using the do-while-loop. Without using the do-while-loop it is called once.
What i want to do…

David W
- 5
- 1
0
votes
2 answers
Dekker's Algorithm for 3 processes (Doesn't Work)
i'm trying to do a simple program with Dekker's Algorithm but with 3 processes. Here's my code:
class DekkerAlg {
static final int iter = 2000000;
static volatile int sharedResource = 0;
/* Thread P wants to enter in the CS */
static volatile…

SGodoy
- 703
- 1
- 5
- 13
0
votes
1 answer
What should we do to overcome livelock? (in general and specific to the code example provided below)
I'm new to Java and is trying to learn the concept of livelock.
I found a great example of livelock online, where a husband and wife are trying to eat soup, but only have one spoon between them. Each spouse is too polite, and will pass the spoon if…

Thor
- 9,638
- 15
- 62
- 137
0
votes
2 answers
Debugging livelock in Django/Postgresql
I run a moderately popular web app on Django with Apache2, mod_python, and PostgreSQL 8.3 with the postgresql_psycopg2 database backend. I'm experiencing occasional livelock, identifiable when an apache2 process continually consumes 99% of CPU for…

Shimon Rura
- 439
- 4
- 13
0
votes
2 answers
Can using sem_trywait() cause a deadlock
Can using sem_trywait() let you get into a deadlock or livelock?

user1422508
- 99
- 1
- 2
- 6
-1
votes
1 answer
Is visualvm able to detect livelocks?
VisualVM is able to detect deadlocks: Get deadlock detection from running programm or dump in Java
Is VisualVM able to detect livelocks? If cannot do it automatically which actions possible to help to reveal livelocks?

J.J. Beam
- 2,612
- 2
- 26
- 55
-1
votes
1 answer
Is this an example of a livelock or deadlock or starvation?
Scheduling Scheme : Preemptive Priority Scheduling
Situation :
A process L (Low priority) acquires a spinlock on a resource (R). While still in the Critical Section, L gets preempted because of the arrival of another process - H (Higher Priority)…

Karthiksrndrn
- 188
- 1
- 12