Lock and Waiters
От | kenneth d'souza |
---|---|
Тема | Lock and Waiters |
Дата | |
Msg-id | BAY116-F29D512E8E5B58DC182211AEDE80@phx.gbl обсуждение исходный текст |
Ответы |
Re: Lock and Waiters
|
Список | pgsql-hackers |
<div style="background-color:"><div class="RTE"><p><br /><br /><div></div><font color="#000000"></font></div><div>I havequestion on Locks and waiting. <br />In the readme pgsql/src/backend/storage/lmgr/README</div><div><br />Each waiteris awoken if (a) its request<br />does not conflict with already-granted locks, and (b) its request does<br />not conflictwith the requests of prior un-wakable waiters.</div><div> </div><div>Let us imagine if there is Process P which isholding a lock and there are individual waiters p1 p2 p3 p4 p5 p6 requiring the same lock. Now since they are in conflictit is sure that there will be wait queue that will get generated as in p1 p2 p3 p4 p5 p6. <br />Imagine if ProcessP releases it lock. As per explaination given in (a) it is sure that p1 will wake up. What is the status of p2. Itwas in conflict with process P and hence should we term it that it will not wake up. Same is the case with p2 ... p6. </div><div> </div><div>Underwhat circumstance will p2 be also woken up taking into consideration that the lock held by processP is released.</div><div>Secondly if p2 is not woken up and if p3's lock doesn't conflict with ( P and p2 ) thenby rule(b) will p3 move ahead of p2</div><div> </div><div>Thanks,<br />Kenneth</div></div><br clear="all" /><hr />Triedthe new MSN Messenger? It�s cool! <a href="http://g.msn.com/8HMAENIN/2749??PS=47575" target="_top">Download now.</a>
В списке pgsql-hackers по дате отправления: