What is S...
What is S...
Starvation in the context of concurrency refers to a situation where a thread or process is unable to gain regular access to the resources it needs to make progress, despite being ready to run. This typically occurs because other threads or processes are consistently given priority, leading to the affected thread being perpetually denied the necessary resources.
wait()
method in Java does not guarantee which waiting thread will be awakened by notify()
, potentially causing indefinite waiting for some threads[1][2].ReentrantLock
with the fairness parameter set to true, to ensure that the longest-waiting thread gains access to resources[1].senior
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào