Questions tagged [starvation]

Starvation is the indefinite postponement of a process because it requires some resource before it can run, but the resource, though available for allocation, is never allocated to this process.

57 questions
1
vote
1 answer

DoS due to infinite renegotiation during read or write

Does OpenSSL and/or the SSL/TLS protocol provide some kind of built in protection against infinite renegotiation? In particular, is it possible for SSL_read() to continue executing forever because the remote side (possibly maliciously) keeps…
Kristian Spangsege
  • 2,903
  • 1
  • 20
  • 43
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
1 answer

how can i force deadlock state in this code regarding "DINING PHILOSOPHERS PROBLEM"?

Having written the code regarding the dinner philosophers problem which avoids the deadlock, I now want to implement the code such that the deadlock occurs I know that deadlock can occur if each of the philosophers is holding only one wand and waits…
0
votes
1 answer

How is unfairness measured in operating systems?

In this article, in the section titled Fairness with difficult workloads, they talk about unfairness and quantify it on a scale that goes from 0% (best) to 50% (worst). How is that measured? What do these numbers indicate?
user401445
  • 15
  • 4
0
votes
1 answer

why the starvation is caused by notifyAll()?

Here is my code, class Shared { private static int index = 0; public synchronized void printThread() { try { while(true) { Thread.sleep(1000); …
HongPro
  • 3
  • 1
0
votes
0 answers

Thread starvation in multiprocessors system

I am implementing the producer-consumer problem. To implement this, we need to have std::condition_variable along with std::mutex to notify threads to wake up. Using these 2 primitives, the producer can notify to consumer and vice-versa to wake up.…
0
votes
0 answers

Can we run out of available threads if we execute bunch of asynchronous I/O operations?

I have a method like this: private Task GetLiveData(List keys, ConcurrentBag resultsBag, CancellationToken cancellationToken) { var tasks = new List(); foreach (var key in keys) { …
SValley_Dev
  • 638
  • 4
  • 8
0
votes
1 answer

Why Disabling Interrupts Synchronization Satisfies Bounded Waiting

Definition: Bounded waiting refers to a process P_i that keeps waiting forever to enter critical section (CS) while other processes P_j keep entering CS although P_i has shown interest to enter CS. Now, I understand why lock variable mechanism is…
Avv
  • 429
  • 4
  • 17
0
votes
1 answer

How do binary semaphores achieve equal execution and starvation?

I am confused as to how the two binary semaphores Q and S are used to both guarantee equal execution and create the possibility of starvation in the following example I was referencing. The rationale for there being guaranteed equal execution in the…
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

Java Multi-threading Deadlock or Starvation?

I am learning for my OCP exam and are trying to understand when we are speaking of a thread deadlock or a thread is in starvation. in case of the scenario below I have doubt. public class ThreadTest { private static int i = 0; public static…
0
votes
1 answer

Starvation-free solution of classic problem Single Lane Bridge Problem

I am attempting to provide a solution to the classic Single Lane Bridge Problem, where a single lane bridge connects two villages. It only uses one thread and so can become deadlocked if farmers jump on either side of the bridge at the same time.…
WebStormer
  • 286
  • 3
  • 17
0
votes
1 answer

Semaphore values while customers are waiting during for a haircut in sleepy barber problem?

I am working on using semaphore values in the sleepy barber problem. I am imagining a scenario in which a customer is already with the barber, and then 4 other customers enter the barber shop. The waiting room has a capacity of three seats. I want…
0
votes
1 answer

implement while loop without starvation for redrawing an image in wpf

i have a wpf form and a canvas in it and an image in canvas. i want this image to move randomly to directions every n milliseconds. i used while loop but it stocked in starvation. so i had no way to implement this movement by one mouse event to see…
0
votes
2 answers

Restricting resource access by type for many-to-many

DISCLAIMER: this post contains edits done on the answers below, all the credits go to their respective owners. I am trying to implement a problem which states that a resource may be used by two types of threads. There can be more threads of each…
CyberFox
  • 342
  • 3
  • 16