1
我已經在谷歌論壇發佈了這個問題,但沒有得到明確的答案。Little Law's:Concurrency
有人可以驗證我的理解Little的法律在鎖定的情況下是否正確。假設我有一個系統讓我獲得鎖定,做一些工作並釋放它。此外,假設做一些「工作」沒有時間。
λ = L/ W (λ = throughout, L=Average number of customer in a stable system, W=Average time spent in the system)
λ = 1/ W (Since a lock will only allow one thread to execute)
λ = 1/10 micros (Supposed average time taken to acquire the lock)
λ = 100,000 per second
因此,只需使用1把鎖的行爲,我的系統的吞吐量爲10萬每秒的上限。
我的推理是否正確?
感謝
每秒處理10萬次的吞吐量立即出現在處理鎖定/解鎖所需的時間爲10 us的建議之後。不需要知道Little的法則。 –