Re: thread synchronization in linux applications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 30, 2003 at 09:59:12AM +0530, MAASK Group wrote:
>   Do applications using threads (like MySQL or PostgreSQL) have locking at 
> thread level for protecting the implicitly shared data section, etc?? Do 
> they use the semget(), semop() calls in linux?? It would be really great if 
> someone put light on our serach!!!

This depends entirely on the threading library in use. There are three
major threading libraries -- libpthreads (provided by glibc), NGPT (an
add-on maintained by IBM), NPTL (new glibc/kernels .. see RH 8.1 betas).

I recall there being another one .. linuxthreads or something like that.
These various libraries use different techniques to expose POSIX thread
semantics to programs on Linux (which uses a different task model than
POSIX).

There are also "home made" thread libraries, which have their own
threading APIs and either use multiple processes with some IPC to
synchronise the threads, or use a single process and non-blocking IO to
provide the abstraction.

In short: there is no simple answer. It depends in large part on the
programs and libraries in use.

-- 
"Sniff you jerks later." -- Captain Murphy

Attachment: pgp00276.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux