Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 1996 14:30:00 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        terry@lambert.org (Terry Lambert)
Cc:        kaleb@x.org, terry@lambert.org, hackers@freefall.freebsd.org
Subject:   Re: Forgiving select() call.
Message-ID:  <199605292130.OAA14477@phaeton.artisoft.com>
In-Reply-To: <199605292043.NAA14327@phaeton.artisoft.com> from "Terry Lambert" at May 29, 96 01:43:35 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > Even though it's statically linked, truss shows that more than a few 
> > shared libraries are loaded from /usr/4lib and /usr/ucblib. It even 
> > loads /usr/lib/libc at runtime. You can't prove that the traps aren't 
> > fixed up by the loader or the ABI runtime before the code is executed.
> 
> Do an ldd on your binaries.  If you are loading shared libraries, you
> must not be statically linked.

Apparently, the ABI support has changed.  In Solaris 2.4, the loader
loads an ABI module program.  THAT'S what's doing the mmaping on
your behalf.

The traps are routed through emulation into the local library to
implement the calls.

>From the gdb perspective, stepping through the code, the code calls
select (trap 93).

This is actually less efficient than simply specifying an alternate
systent[] table pointer, and doing call emulation in the kernel.

Depending on where you draw the system interface line, then it can
be considered to be calling poll (certainly, that's the implementation
on the other side of the call trap).  The application, whose code
is not changes, believes it is calling select.

Apparently the select has 1ms resoloution, but rounds down.  The
additional overhead is sufficient to add about 200us to the time,
which is enough that it appears to be providing the requested
delay, when in fact it is not.

My appologies to Kaleb; from his perspective, he is right.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605292130.OAA14477>