Problems with Async Socket I/O on SUN-OS

Problems with Async Socket I/O on SUN-OS

Post by Rakesh J » Sat, 02 Jun 1990 18:27:00



I have some code that uses SIGIO-driven socket I/O. It works fine on 4.3BSD
but does not work on SUN-OS version 3.5. The initial symptom of the problem
was that on SUN-OS, no SIGIO signal got generated when I wrote to a socket
which had been setup for asynchronous receipt (using "fcntl").

In the 4.3BSD version, I set up sockets between two processes using the usual
"socket", "bind", "connect", and "accept" system calls. One of the processes
(called "slave") uses "fcntl" to setup its socket for asynchronous receipt of
messages. The other process (called "master") leaves its socket setup for
synchronous receipt of messages. When the "master" writes a message (fixed
size = 256 bytes) to its socket, SIGIO gets generated as expected, and I am
able to do non-blocking reads from within the SIGIO handler in the "slave".

When I try to use the same code on SUN-OS, no SIGIO gets generated. Things
change if the "master" also sets up its socket for asynchronous receipt of
messages. In this case, a SIGIO does get generated (well, sort of) in the
"slave" process when the "master" writes to its socket. The problem is that
the "master" has to write at least 4096 bytes before a SIGIO is delivered to
the other process. For my application, this apparent "buffering" within SUN-OS
is intolerable.

Now the questions:

1. Is it a bug in SUN-OS that both parties must set up their end-points for
   asynchronous receipt, for SIGIO to work properly?

2. If it is not a bug in SUN-OS, then is it a bug in 4.3BSD that both parties
   do not have to make their sockets asynchronous?

3. Is there a way of changing the size of the buffers somewhere so that a
   SIGIO gets generated after 256 bytes are written instead of 4096 bytes?
   4.3BSD has two options (for use with "setsockopt") called SO_SNDBUF and
   SO_RCVBUF, to adjust the sizes for output and input buffers respectively.
   However, these options do not seem to exist on SUN-OS.

Please e-mail your suggestions/comments directly to me.

--------------------------------------------------
Rakesh Jha, Honeywell Systems and Research Center
MAIL: 3660 Technology Drive, Minneapolis, MN 55418

UUCP: {ihnp4, philabs, umn-cs, ems}!srcsip!jha
PHON: (612) 782-7320

 
 
 

1. SUN ISDN 1.0.2 and SUN async PPP (Solaris 2.4)

We have been using the PPP package on Solaris 2.4 until now without
any problems over a serial link plus a V.34 modem. When I installed
SUN ISDN 1.0.2, however, the modem hang (i.e. did not answer)
sometimes after using async PPP (I have not tested ISDN yet). The
reason is, that SUN ISDN replaces the ppp program and ipdp* files
under /usr/kernel. So it seems, that SUN ISDN is not compatible with
async PPP. Is this correct? Is there a patch for it or will it work
under Solaris 2.5?
--

Institut fr Rechnergesttzte   fax. +49 511 762-9712
Wissensverarbeitung             tel. +49 511 762-9710
Universit?t Hannover
Lange Laube 3, 30159 Hannover, Germany
http://www.kbs.uni-hannover.de/homepage.html

2. need help on rs/6000 b50

3. Problem adding tty port using 128 Port Async Adapter with 16 port Async Node

4. Will RedHat 5.2 work with a creative labs pci128?

5. Help! Async I/O socket problems.

6. Migratepv

7. problem with Async I/O and sockets

8. More sound woes (snes9x and sound)

9. sun-os sub-shell problems

10. Looking for a tutorial on sockets (Sun OS or BSD)

11. To async or not not async

12. Arggh, Apache (OS/2) says: "Socket operation on non-socket."

13. async multiple sockets