Thread differences between Solaris 8 and 9

Thread differences between Solaris 8 and 9

Post by Gary Mil » Wed, 03 Dec 2003 02:16:42



I have an apache server that I built under Solaris 2.6, and run on
both Solaris 8 and Solaris 9.  I notice that `pstack' on the httpd
process on Solaris 8 shows four threads, but on Solaris 9, it shows
only a single thread.  This is apache_1.3.27, which is supposed to
be single-threaded.  What's going on?

--
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

 
 
 

Thread differences between Solaris 8 and 9

Post by Roger Faulkn » Wed, 03 Dec 2003 11:58:05



> I have an apache server that I built under Solaris 2.6, and run on
> both Solaris 8 and Solaris 9.  I notice that `pstack' on the httpd
> process on Solaris 8 shows four threads, but on Solaris 9, it shows
> only a single thread.  This is apache_1.3.27, which is supposed to
> be single-threaded.  What's going on?

You are seeing the daemon threads created by the default libthread
for its own internal purposes in Solaris 8.

In Solaris 9, there is an entirely new libthread.
(It was the alternate libthread in Solaris 8.)
It doesn't create any daemon threads.
The only threads you get are the ones you create.

If apache_1.3.27 is supposed to be single-threaded,
why did you link it with -lthread?

Roger Faulkner


 
 
 

Thread differences between Solaris 8 and 9

Post by Gary Mil » Wed, 03 Dec 2003 12:29:42




>> I have an apache server that I built under Solaris 2.6, and run on
>> both Solaris 8 and Solaris 9.  I notice that `pstack' on the httpd
>> process on Solaris 8 shows four threads, but on Solaris 9, it shows
>> only a single thread.  This is apache_1.3.27, which is supposed to
>> be single-threaded.  What's going on?
>You are seeing the daemon threads created by the default libthread
>for its own internal purposes in Solaris 8.

Ah, I see.  Nothing to be concerned about, then.

Quote:>In Solaris 9, there is an entirely new libthread.
>(It was the alternate libthread in Solaris 8.)
>It doesn't create any daemon threads.
>The only threads you get are the ones you create.
>If apache_1.3.27 is supposed to be single-threaded,
>why did you link it with -lthread?

I didn't, explicitly.  The default configuration includes:

        LIBS="$LIBS -lsocket -lnsl -lpthread"

for Solaris.

--
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

 
 
 

1. Differences between Solaris threads and POSIX threads

Can anyone give me a list of the differences and/or a pointer to a document,
that describes the differences between Solaris threads and POSIX threads -
beyond that which is in the man page (man threads) ?

The one difference of which I am aware is that if a multi-threaded app
fork()s, in Pthreads, only the calling thread is duplicated, while in
Solaris threads, the whole thing is duplicated (which, incidentally, the
semantics of fork, if interpreted literally, requires).

2. long file names in mandrake 6.1

3. Difference between Posix Threads and Solaris threads

4. benchmark for speed in linux / windows

5. Threads in linux versus threads in NT and threads in Solaris.

6. Bumbling attempts to install R5 on 2.1

7. umask

8. FreeBSD signals & threads : differences compared to Solaris/Linux implementations ?

9. threads in Linux and Solaris - differences?

10. Matrox Mystique ands X.

11. Solaris 8 threads: If a routine is Async-Signal-Safe is it also thread Safe?

12. Thread scheduling in Solaris threads