Solved

Thread Safe in DB or gdbm

Posted on 1998-03-03
4
651 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 50 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

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

632 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