1999Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Sockets and fibers -->
<!--X-From-R13: X Q Znjerapr <pynjNhaqre.rate.ftv.pbz> -->
<!--X-Date: Wed, 20 Jan 1999 20:01:38 &#45;0800 -->
<!--X-Message-Id: 199901210401.UAA96104#under,engr.sgi.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 009301be44a3$ee058610$55e5edd0@dev&#45;18.chilisoft.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:claw#under,engr.sgi.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="msg00240.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00242.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00239.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00243.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00241">Author</A>
&nbsp;|&nbsp;<A HREF="#00241">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00241">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>: J C Lawrence &lt;<A HREF="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</A>&gt;</LI>
<LI><em>Date</em>: Wed, 20 Jan 1999 20:01:33 -0800</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 Wed, 20 Jan 1999 10:36:44 -0800 
Caliban Tiresias Darklock&lt;caliban#darklock,com&gt; wrote:

&gt; From: Adam J. Thornton

&gt;&gt; I suppose this really turns into a request about what a fiber is.

&gt; Per MS docs: "A fiber is a lightweight thread that is manually
&gt; scheduled.  Specific fiber APIs include: ConvertThreadToFiber()
&gt; CreateFiber() DeleteFiber() GetCurrentFiber() GetFiberData()
&gt; SwitchToFiber()"

From a MUD server viewpoint fibers are actually pretty obvious:
they are threads that the application itself handles the scheduling
for.

Consider the typical MOO or ColdX:

  There are various verbs etc which are executing in parallel.  In
order to preserve responsiveness the server itself, multi-threads
the verb executions.  It does this by allocating a processer time
per verb, and then cooperatively context switching over to the next
verb in the round-robin ring.  ie the server core cycles among the
verbs in an elegant and controlled manner, managing its own
deadlock/data-integrity issues etc for itself without any kernel
involvement.  

&lt;&lt;Yes, I know that this really isn't true, but its good enough.&gt;&gt;

Compare this to more typical threads, such as pthreads , or threads
under OS/2 or NT.  

  There threads are actually almost independant processes except for
the fact that they share a data segment.  Further, the threads don't
context shift cooperatively, but instead are scheduled by the kernel
and context shift preemptively.  In this model threads are really
stand alone beasts that are launched in parallel with the current
execution, and then left to more or less run on their own (minus
enforced synchronise points etc).  With fibers, the application
itself manages all its internal "threading", and so does __ALL__ the
dirty work.

What does NT's implementation of fibers give you above the simple
and fairly obvious cooperative task switching commonly used in MUD
servers?  I have no idea.  I suspect that it mostly gives you a
uniform (?) interface to the concept with some documented
behaviours.

-- 
J C Lawrence                              Internet: claw#kanga,nu
(Contractor)                             Internet: coder#kanga,nu
---------(*)                    Internet: claw#under,engr.sgi.com
...Honorary Member of Clan McFud -- Teamer's Avenging Monolith...


</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="00243" HREF="msg00243.html">[MUD-Dev] Re: Sockets and fibers</A></strong>
<ul compact><li><em>From:</em> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</li></ul>
</UL></LI></UL>
<!--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>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00240.html">[MUD-Dev] Re: META: List peerage and behaviour</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00242.html">[MUD-Dev] Re: META: list "peerage"</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00239.html">[MUD-Dev] Re: Sockets and fibers</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00243.html">[MUD-Dev] Re: Sockets and fibers</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00241"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00241"><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="00222" HREF="msg00222.html">[MUD-Dev] Re: ADMIN: List server and Kanga.Nu host changes</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Thu 21 Jan 1999, 00:04 GMT
<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>
</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>