HTML/JavaScript小工具

HTML/JavaScript小工具

2013年5月8日 星期三

Livelocks and Lock Starvation

Deadlock
describes a situation where two or more threads are blocked forever, waiting for each other.

Livelocks

當兩個執行序在運作~1個作改變另一個作還原!~看似程式沒變化但實際上一直在改變
unable to make further progress.
unable to perform any real work.

Lock Starvation
當有很多個Thread是高優先權時,低優先權的Thread會一直拿不到Key 
 most of the time


Livelocks
ccurs when threads become so busy in responding to each other that they are unable to perform any real work.

Deadlock
Thread 1 and 2 are said to be deadlocked when Thread 1 is blocked waiting for Thread 2 to release a resource, while Thread 2 is blocked waiting for Thread 1 to release another resource.

Starvation
when a thread is frequently unable to get access to a resource because the resource is hogged by other threads most of the time.
官方說法:
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.

沒有留言:

張貼留言