1999Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Sockets and fibers -->
<!--X-From-R13: "Xba O. Znzoreg" <wyflfvapNvk.argpbz.pbz> -->
<!--X-Date: Sun, 24 Jan 1999 18:00:00 &#45;0800 -->
<!--X-Message-Id: 199901250159.TAA13886@dfw&#45;ix6.ix.netcom.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: caliban#darklock,com -->
<!--X-Reference: 009301be44a3$ee058610$55e5edd0@dev&#45;18.chilisoft.com -->
<!--X-Reference: 199901210401.UAA96104#under,engr.sgi.com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: Sockets and fibers</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:jlsysinc#ix,netcom.com">
</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="msg00244.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00245.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00241.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00295.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00243">Author</A>
&nbsp;|&nbsp;<A HREF="#00243">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00243">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Sockets and fibers</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: Sockets and fibers </LI>
<LI><em>From</em>: "Jon A. Lambert" &lt;<A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A>&gt;</LI>
<LI><em>Date</em>: Sun, 24 Jan 1999 21:00:01 -5</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>
On 20 Jan 99, J C Lawrence wrote:
&gt; 
&gt; What does NT's implementation of fibers give you above the simple
&gt; and fairly obvious cooperative task switching commonly used in MUD
&gt; servers?  I have no idea.  I suspect that it mostly gives you a
&gt; uniform (?) interface to the concept with some documented
&gt; behaviours.
&gt; 

Nod, fibers are almost equivalent to writing your own context switching 
system.  The advantage here is complete control over scheduling, the 
disadvantage is of course the complexity of writing your scheduler.  The 
scheduler you write might be slower or faster than using threads, depending on
the complexity of the scheduler.  The nice thing is, while threads are wholly
dependent on how your OS timeslices, prioritizes and preempts running tasks,
fibers allow your application to make decisions on when to preempt based on
anything _you_ believe is important to the application. There are a couple
advantages of fibers vs. roll-your-own.  First, there is already a documented
common API.  The actual context switch code is already written and very
granular already, saving and loading registers, etc.  Sure you could design
your own custom API that did this, although you would probably have to resort
to a few lines of assembler to match the speed of the fiber context switch.  Or
settle for the lower granularity simular to what many muds' VMs do to effect a
context switch.   Second, there are whole host of asynchronous and overlapped
file/network I/O functions that are exposed on the NT platform when you use
fibers (or threads).  So some of the advantages are very platform specific.

Good description of threads, BTW. 

--
--*     Jon A. Lambert - TychoMUD       Email:jlsysinc#,ix.netcom.com      *--
--*     Mud Server Developer's Page &lt;<A  HREF="http://pw1.netcom.com/~jlsysinc">http://pw1.netcom.com/~jlsysinc</A>&gt;      *--
--* I am the Dragon of Grindly Grund, but my lunches aren't very much fun, *--
--* For I like my damsels medium rare, And they always come out well done. *--


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00228" HREF="msg00228.html">[MUD-Dev] Re: Sockets and fibers</A></STRONG>
<UL><LI><EM>From:</EM> "Caliban Tiresias Darklock" &lt;caliban#darklock,com&gt;</LI></UL></LI>
<LI><STRONG><A NAME="00241" HREF="msg00241.html">[MUD-Dev] Re: Sockets and fibers</A></STRONG>
<UL><LI><EM>From:</EM> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00244.html">[MUD-Dev] ADMIN: We're working again.</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00245.html">[MUD-Dev] Re: META: list "peerage"</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00241.html">[MUD-Dev] Re: Sockets and fibers</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00295.html">[MUD-Dev] Re: Sockets and fibers</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00243"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00243"><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><A NAME="00221" HREF="msg00221.html">[MUD-Dev] Re: [DevMUD] Re: From Devmud: Database module, draft 3</A></strong>, 
Greg Connor <a href="mailto:gconnor#nekodojo,org">gconnor#nekodojo,org</a>, Wed 20 Jan 1999, 23:58 GMT
<LI><strong><A NAME="00228" HREF="msg00228.html">[MUD-Dev] Re: Sockets and fibers</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Wed 20 Jan 1999, 18:41 GMT
<UL>
<LI><strong><A NAME="00239" HREF="msg00239.html">[MUD-Dev] Re: Sockets and fibers</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Thu 21 Jan 1999, 02:27 GMT
</LI>
<LI><strong><A NAME="00241" HREF="msg00241.html">[MUD-Dev] Re: Sockets and fibers</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 21 Jan 1999, 04:01 GMT
<UL>
<LI><strong><A NAME="00243" HREF="msg00243.html">[MUD-Dev] Re: Sockets and fibers</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Mon 25 Jan 1999, 02:00 GMT
</LI>
</UL>
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00295" HREF="msg00295.html">[MUD-Dev] Re: Sockets and fibers</A></strong>, 
Dr. Cat <a href="mailto:cat#oldzoom,bga.com">cat#oldzoom,bga.com</a>, Tue 26 Jan 1999, 21:56 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00225" HREF="msg00225.html">[MUD-Dev] Sockets and fibers</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Wed 20 Jan 1999, 17:15 GMT
<UL>
<LI><strong><A NAME="00226" HREF="msg00226.html">[MUD-Dev] Re: Sockets and fibers</A></strong>, 
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Wed 20 Jan 1999, 17:26 GMT
</LI>
<LI><strong><A NAME="00227" HREF="msg00227.html">[MUD-Dev] Re: Sockets and fibers</A></strong>, 
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Wed 20 Jan 1999, 17:55 GMT
</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>