niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Berkeley DB
About BDB Concurrent Data Store applications
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
sunnyboy
*nix forums beginner


Joined: 14 Jul 2006
Posts: 2

PostPosted: Fri Jul 14, 2006 12:26 am    Post subject: About BDB Concurrent Data Store applications Reply with quote

As we know that Berkeley DB provides interfaces supporting
deadlock-free, multiple-reader/single writer access to the database.

Now I want to new five threads which want to do the 'write' operation
with one database at the same time , but only one thread can write the
db at one time, the other four will be hanged. This is the question
that which is the next executable thread in the other four threads,
what is the order and rule?

Thank you very much!


--
sunnyboy
------------------------------------------------------------------------
sunnyboy's Profile: http://www.dbtalk.net/m518
View this thread: http://www.dbtalk.net/t319174
Back to top
Michael Cahill
*nix forums Guru Wannabe


Joined: 26 May 2005
Posts: 219

PostPosted: Fri Jul 14, 2006 2:06 am    Post subject: Re: About BDB Concurrent Data Store applications Reply with quote

Quote:
Now I want to new five threads which want to do the 'write' operation
with one database at the same time , but only one thread can write the
db at one time, the other four will be hanged. This is the question
that which is the next executable thread in the other four threads,
what is the order and rule?

Berkeley DB will unlock the threads in the order they arrived. That,
of course, depends on how the threads are scheduled on your system.

Michael.
Back to top
sunnyboy
*nix forums beginner


Joined: 14 Jul 2006
Posts: 2

PostPosted: Fri Jul 14, 2006 4:22 am    Post subject: Re: About BDB Concurrent Data Store applications Reply with quote

Michael, Thank you very much!

And do you have any manuals about this part, I want to study more
detailed.:)


--
sunnyboy
------------------------------------------------------------------------
sunnyboy's Profile: http://www.dbtalk.net/m518
View this thread: http://www.dbtalk.net/t319174
Back to top
Michael Cahill
*nix forums Guru Wannabe


Joined: 26 May 2005
Posts: 219

PostPosted: Fri Jul 14, 2006 6:31 am    Post subject: Re: About BDB Concurrent Data Store applications Reply with quote

Quote:
And do you have any manuals about this part, I want to study more
detailed.Smile

This is really an implementation detail that isn't covered in our
documentation.

However, if you have a Berkeley DB source tree, look at
__lock_get_internal in lock/lock.c. You will see that there are
holding and waiting queues, and requests are put onto one of those
queues depending on whether the locks conflict.

I think the best reference book to read for this area is still Jim
Gray's "Transaction Processing: Concepts and Techniques".

Regards,
Michael.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 12:22 pm | All times are GMT
navigation Forum index » Databases » Berkeley DB
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Bug#379103: ITP: complearn-gui -- 3D drag-and-drop interf... Rudi Cilibrasi devel 0 Fri Jul 21, 2006 11:00 am
No new posts Bug#379087: ITP: libcomplearn -- data-compression based i... Rudi Cilibrasi devel 0 Fri Jul 21, 2006 7:40 am
No new posts How do I render JPEG Data stored in char* buffer? On the Sparrow C++ 2 Thu Jul 20, 2006 8:44 pm
No new posts ANNOUNCE: Data-centric PHP framework (GPL) Kenneth Downs PHP 0 Thu Jul 20, 2006 6:11 pm
No new posts XML-RPC calls with real UTF8 data failed Erik Wasser Perl 0 Thu Jul 20, 2006 3:40 pm

Advertising | Problem Mortgage | Free Myspace Layouts | Loans | Car Accident Attorney Los Angeles
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1511s ][ Queries: 16 (0.0724s) ][ GZIP on - Debug on ]