Starvation and livelock are much less common a problem than deadlock, but are still problems that every designer of concurrent software is likely to encounter.
LiveLock
Livelock occurs when all threads are blocked, or are otherwise unable to proceed due to unavailability of required resources, and the non-existence of any unblocked thread to make those resources available. In terms of Java API, thread livelock can occur in following conditions:
- When all the threads in a program execute Object.wait(0) on an object with zero parameter. The program is live-locked and cannot proceed until one or more threads call Object.notify() or Object.notifyAll() on the relevant objects. Because all the threads are blocked, neither call can be made.
- When all the threads in a program are stuck in infinite loops.
Starvation
Starvation describes a situation where a thread is unable to gain regular access to shared resources and is unable to make progress. This happens when shared resources are made unavailable for long periods by "greedy" threads. For example, suppose an object provides a synchronized method that often takes a long time to return. If one thread invokes this method frequently, other threads that also need frequent synchronized access to the same object will often be blocked. Starvation occurs when one thread cannot access the CPU because one or more other threads are monopolizing the CPU. In Java, thread starvation can be caused by setting thread priorities inappropriately. A lower-priority thread can be starved by higher-priority threads if the higher-priority threads do not yield control of the CPU from time to time.
7 comments:
quite helpfull
Best explanation :)
Did you know that that you can generate cash by locking premium areas of your blog / site?
Simply join AdscendMedia and run their content locking tool.
ERP systems are a great way to help you manage your company, even when it's a big one. I bought the software from AX Dynamics - you can click here to find out about their terms and prices. I recommend it!
Did you realize there's a 12 word phrase you can say to your man... that will trigger intense feelings of love and instinctual appeal to you deep within his chest?
That's because deep inside these 12 words is a "secret signal" that triggers a man's instinct to love, adore and protect you with all his heart...
12 Words That Fuel A Man's Love Instinct
This instinct is so hardwired into a man's genetics that it will drive him to try better than ever before to build your relationship stronger.
In fact, fueling this influential instinct is absolutely binding to having the best possible relationship with your man that once you send your man one of the "Secret Signals"...
...You'll instantly notice him expose his mind and heart to you in such a way he haven't experienced before and he'll perceive you as the one and only woman in the universe who has ever truly tempted him.
As reported by Stanford Medical, It is really the one and ONLY reason women in this country get to live 10 years more and weigh on average 19 kilos lighter than we do.
(And by the way, it really has NOTHING to do with genetics or some secret diet and absolutely EVERYTHING related to "HOW" they eat.)
P.S, I said "HOW", not "WHAT"...
Click on this link to determine if this easy questionnaire can help you discover your real weight loss potential
HVAC & Plumbing Services
Air Star Heating guarantees reliability and quality for all equipment and services.
Air Star Heating specialists always try to deliver the most excellent quality of services to our customers at an affordable price. It is understood that every client has different needs and different problems. We try to accomplish the needs of every client according to their requests. We are having considerable experience in this field. Our specialists understand very well how things work. It doesn’t matter in which field of industry you are looking for services.
Plumbing & HVAC Services in San Diego. Call now (858) 900-9977 ✓Licensed & Insured ✓Certified Experts ✓Same Day Appointment ✓Original Parts Only ✓Warranty On Every Job.
Visit:- https://airstarheating.com
Post a Comment