1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: lurker emerges -->
<!--X-From-R13: Quevf Uenl <ptNnzv&#45;pt.UenlEntr.Sqzbagba.OP.QO> -->
<!--X-Date: Sun, 9 Aug 1998 22:28:24 &#45;0700 -->
<!--X-Message-Id: 199808100528.XAA03186@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: lurker emerges</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00611.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00613.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00602.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00614.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00612">Author</A>
&nbsp;|&nbsp;<A HREF="#00612">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00612">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: lurker emerges</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: lurker emerges</LI>
<LI><em>From</em>: Chris Gray &lt;<A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A>&gt;</LI>
<LI><em>Date</em>: Sun, 9 Aug 1998 23:28:17 -0600</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
[Vadim Tkachenko:]

[Double buffering:]

 &gt;I could be wrong, but I wish it rest in piece - it was a performance
 &gt;tuning nightmare. Either your I/O theread hogs all the resources looping
 &gt;idle, waiting for the input, or it lags because of the wrong priority
 &gt;set or bad timing.
 &gt;
 &gt;For me, the blocking I/O and a possibility to interrupt it (exceptions)
 &gt;is a blessing.
 &gt;
 &gt;Comments, anyone?

I'm gonna have to completely disagree here. Double buffering is a very
standard technique for increasing performance. It is completely
independent of polling (so there is no "looping idle"). A common
use of it nowadays is in the lower level parts of graphics systems:

    create image in buffer 0
    which &lt;= 0
loop:
    set hardware to display buffer [which]
    which &lt;= 1 - which
    create image in buffer [which]
    wait for CRT scan to reach end of current frame
    goto loop

CRT controllers can generate an interrupt when the frame is complete,
thus waking up the 'wait'. This is how you get rid of graphics 'tearing',
which is caused by having only one buffer which you are changing while it
is being displayed.

A lot of high-performance software uses double-buffering for I/O as well.
UNIX will often have multiple I/O operations on-going at once, and
will respond to the first that completes. Modern SCSI controllers can
have requests to multiple devices outstanding, and will respond to
whichever finishes first.

[Rant on]

In general, the lack of proper asynchonous I/O is one of my strongest
complaints about UNIX. It is trivial to build blocking I/O on top of
non-blocking I/O, but the reverse is not true. (The 'aio' family of
calls are, I believe, just library routines built on top of the
standard calls using the SIGIO/SIGPOLL facility. Perhaps not - I
haven't investigated them closely.)

I'm bumping into this right now with my simple MUD client. I call out
to an external editor for editing stuff, but the client needs to stay
active while that editing is going on. So, to know when the editor process
is done, I need to set up a SIGCHLD handler and catch the process exit.
However, that is a signal, which if I'm not careful can cause error
reports from 'read's on user input and on read/writes to the socket
to the server. Ick. Give me true asynchronous I/O (like on the Amiga)
anyday!

[Rant off]

-- 
Chris Gray     cg#ami-cg,GraySage.Edmonton.AB.CA


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="01055" HREF="msg01055.html">[MUD-Dev] Re: lurker emerges</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</li></ul>
<li><strong><A NAME="00614" HREF="msg00614.html">[MUD-Dev] Re: lurker emerges</A></strong>
<ul compact><li><em>From:</em> Vadim Tkachenko &lt;vt#freehold,crocodile.org&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00611.html">[MUD-Dev] Re: lurker emerges</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00613.html">[MUD-Dev] Re:  Ethernet NICS, maximum connections..mud testing.</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00602.html">[MUD-Dev] Re: lurker emerges</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00614.html">[MUD-Dev] Re: lurker emerges</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00612"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00612"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>[MUD-Dev] Re: lurker emerges</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00615" HREF="msg00615.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Petri Virkkula <a href="mailto:pvirkkul#iki,fi">pvirkkul#iki,fi</a>, Mon 10 Aug 1998, 05:57 GMT
</LI>
</ul>
</ul>
<LI><strong><A NAME="00600" HREF="msg00600.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Sun 09 Aug 1998, 23:54 GMT
<UL>
<LI><strong><A NAME="00603" HREF="msg00603.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Mon 10 Aug 1998, 02:19 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00602" HREF="msg00602.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 10 Aug 1998, 02:18 GMT
</LI>
<LI><strong><A NAME="00612" HREF="msg00612.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 10 Aug 1998, 05:28 GMT
<UL>
<LI><strong><A NAME="00614" HREF="msg00614.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Mon 10 Aug 1998, 05:57 GMT
</LI>
<LI><strong><A NAME="01055" HREF="msg01055.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 17 Sep 1998, 00:57 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="01058" HREF="msg01058.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 17 Sep 1998, 02:19 GMT
<UL>
<LI><strong><A NAME="01059" HREF="msg01059.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 17 Sep 1998, 06:32 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>