Lock and Waiters

From: "kenneth d'souza" <kd_souza(at)hotmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Lock and Waiters
Date: 2007-08-01 11:01:01
Message-ID: BAY116-F29D512E8E5B58DC182211AEDE80@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

<html><div style='background-color:'><DIV class=RTE>
<P><BR><BR></P>
<DIV></DIV><FONT color=#000000></DIV>
<DIV>I have question on Locks and waiting. <BR>In the readme pgsql/src/backend/storage/lmgr/README</DIV>
<DIV><BR>Each waiter is awoken if (a) its request<BR>does not conflict with already-granted locks, and (b) its request does<BR>not conflict with the requests of prior un-wakable waiters.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Let us imagine if there is Process P which is holding a lock and there are individual waiters p1 p2 p3 p4 p5 p6 requiring the same lock. Now since they are in conflict it is sure that there will be wait queue that will get generated as in p1 p2 p3 p4 p5 p6. <BR>Imagine if Process P releases it lock. As per explaination given in (a) it is sure that p1 will wake up. What is the status of p2. It was 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>&nbsp;</DIV>
<DIV>Under what circumstance will p2 be also woken up taking into consideration that the lock held by process P is released.</DIV>
<DIV>Secondly if p2 is not woken up and if p3's lock doesn't conflict with&nbsp; ( P and p2 ) then by rule(b) will p3 move ahead&nbsp; of p2</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks,<BR>Kenneth</DIV></FONT></div><br clear=all><hr>Tried the new MSN Messenger? Its cool! <a href="http://g.msn.com/8HMAENIN/2749??PS=47575" target="_top">Download now.</a> </html>

Attachment Content-Type Size
unknown_filename text/html 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Mitchell 2007-08-01 12:52:34 How do I connect postgres table structures and view structures to an existing svn repository?
Previous Message Pavan Deolasee 2007-08-01 09:06:06 HOT patch - version 11