Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Thread Safe in DB or gdbm

Posted on 1998-03-03
4
Medium Priority
?
663 Views
Last Modified: 2013-12-26
Hello,
I am a FreeBSD user.  I noticed that there are two datbase manager libraries which are db.h and gdbm .  I wonder do these libaries are "thread safe"?  Do they have synchronization code inside their code ?
0
Comment
Question by:andrewma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Expert Comment

by:aditya070797
ID: 1296085
Hi andrewma,
     I don't know if FreeBSD supports threads or not, but I would check the man pages for gdbm/dbm, and if the man page does not mention that these are thread-safe, you can assume that they are not thread-safe. There is a difference in being thread safe and having synchronization code though, the library code might have synchronization code, but might be completely thread-unsafe.
    I would check the man pages and any accompanying documentation.
--Aditya
0
 

Expert Comment

by:dps96r
ID: 1296086
I know this is version dependent
  - Ancient versions of berkley db lack the proper flock stuff
  - At least most version of berkley db and gdbm, are not thread safe
  - The glibc 2.x version might be thread safe,

Duncan (-:
0
 

Author Comment

by:andrewma
ID: 1296087
Thanks
0
 

Accepted Solution

by:
dps96r earned 200 total points
ID: 1296088
As far as I know the glibc 1.x versions are not thread safe but
glibc 2.x versions are thread safe. Judging by the sysdeps
directoires the glibc 2.x source supports FreeBSD. If uo have a
clone(2) system call the LinuxThreads stuff should compile easily.

glibc 2.x includes supports both sorts of databases and only
breaks a few programs (classic things are declarations of things
like sys_errlist...) glibc 2.x *is* linux libc 6 as used in RedHast 5.0, for example.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question