Re: [pgsql-www] NuSphere and PostgreSQL for windows - Mailing list pgsql-hackers

From Greg Stark
Subject Re: [pgsql-www] NuSphere and PostgreSQL for windows
Date
Msg-id 87he30j255.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: [pgsql-www] NuSphere and PostgreSQL for windows  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
Responses Re: [pgsql-www] NuSphere and PostgreSQL for windows
List pgsql-hackers
Shridhar Daithankar <shridhar_daithankar@persistent.co.in> writes:

> The little pthreads programming I did on linux/freeBSD tells me that it
> supports majority of features except TLS(linux2.4/linuxthreads) and per thread
> signals. 

LinuxThreads is dead. NPTL is the way and the light.

It has ELF TLS which for super-fast thread-local storage, proper per-thread
signal semantics, as well as not using USR1,USR2 in ways that mess up
signal-handling. It also has kernel support for user-space mutexes (strange as
that may sound).

> >>I am sure local buffers would be lot cheaper than shared buffers.
> > On what do you base that?  It sounds like pure fantasy to me.  RAM is RAM.

Well that's not entirely true. Thread context switches don't involve MMU
operations the way process context switches do. So even though RAM is RAM, the
RAM in the threaded implementation might be faster to access simply because
it's already in the processor cache. The process model has to do a TLB flush
and load a whole new page table which takes a lot of time to begin with, and
then slows down all memory accesses later.

-- 
greg



pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: PL contribution guidelines?
Next
From: Manfred Spraul
Date:
Subject: Re: Threads vs Processes (was: NuSphere and PostgreSQL