dbTalk Databases Forums  

Re: Multiprocess access without locking

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Re: Multiprocess access without locking in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Florian Weimer
 
Posts: n/a

Default Re: Multiprocess access without locking - 12-14-2005 , 02:39 AM






* Kiran Kumar M. R.:

Quote:
I want to used BDB as TDS. This BDB will be accessed by multiple
processes simultaneously. Is it possible to use BDB without locking
subsystem.
No, locking is necessary to ensure the consistency of Berkeley DB's
internal data structures, even if your application can work with
inconsistent data.


Reply With Quote
  #2  
Old   
ragavendrakk@gmail.com
 
Posts: n/a

Default Re: Multiprocess access without locking - 12-14-2005 , 07:16 AM






1) When BDB is open with out DB_INIT_LOCK, multiple processes can still
update data consistenly. So can one explain why this behaviour exhibted
when INIT_LOCK is necessary?

2)How can i avoid a dead lock when multiple processes access single
instance of BDB?

I have configured the lock matrix as mutex, shown below

NG Read Write
NG 0 0 0
Read 0 1 1
Write 0 1 1

even with this configuration am not able to avoid deadlocks. Pls
suggest an alternative to avoid deadlock when multiple processes access
BDB.

Thanks
Ragha


Reply With Quote
  #3  
Old   
Florian Weimer
 
Posts: n/a

Default Re: Multiprocess access without locking - 12-23-2005 , 08:18 AM



Quote:
1) When BDB is open with out DB_INIT_LOCK, multiple processes can still
update data consistenly.
This has to be a limitation in your test procedures. Perhaps no page
allocation takes place, or something like that.

Quote:
2)How can i avoid a dead lock when multiple processes access single
instance of BDB?
With TDS, you can use the "Read Comitted" isolation level to avoid
almost all deadlocks in a single writer/multiple readers scenario.

But apart from that, deadlocks are a fact of life you have to deal
with. Make sure that deadlock detection takes place, retry
transactions aborted due to deadlocks, and you should be fine.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.