Hi, You can avoid a deadly embrace if you can arrange it so that all processes lock related tables/files in the same sequence.
Take the example of a system with a CUSTOMER file, a ORDER HEADER file and an ORDER DETAILS file. If some processes lock the ORDER HEADER file first and the CUSTOMER file second, and other processes do it the other way around, then you will end up, sooner or later, with a deadly embrace, If all processes always lock the ORDER HEADER file first and the CUSTOMER file second, then you wont get a deadly embrace. You will get the situation where there is contention for the same CUSTOMER record, but it wont be a deadly embrace. One process will be holding the lock, and the other one will need to wait. In the normal course of events the process holding the CUSTOMER lock will finish and relinquish the lock, and allow the waiting process to acquire the lock and continue. cheers, asvin From: Wjhonson <wjhon...@aol.com> To: u2-users@listserver.u2ug.org Date: 25/10/2011 18:28 Subject: Re: [U2] [UV] LIST.READU EVERY's "waiters" when there are writes w/o explicit readu. Sent by: u2-users-boun...@listserver.u2ug.org This is deadly embrace http://knol.google.com/k/will-johnson/deadly-embrace-on-pick-systems/4hmquk6fx4gu/816#view The Locked clause does not save us from it. There is no known trivial solution to the problem, which troubles all multi-table, multi-user database environments. Perhaps we should start a new thread to discuss various approaches to the issue. _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised and regulated by the Financial Services Authority. ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users