1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: RE: [MUD&#45;Dev]  Re: MUD Development Digest -->
<!--X-From-R13: "Xhfgva [pYvaarearl" <klzbkNgbba.bet> -->
<!--X-Date: Mon, 06 Apr 1998 12:31:36 +0000 -->
<!--X-Message-Id: 000501bd6157$b55cf8a0$243939cc#foghorn,toon.org -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.GSO.3.95q.980404081657.17890B&#45;100000@uhunix2 -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, RE: [MUD-Dev]  Re: MUD Development Digest</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:xymox#toon,org">
</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="msg00038.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00040.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00037.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00082.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00039">Author</A>
&nbsp;|&nbsp;<A HREF="#00039">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00039">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>RE: [MUD-Dev]  Re: MUD Development Digest</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>&gt;</LI>
<LI><em>Subject</em>: RE: [MUD-Dev]  Re: MUD Development Digest</LI>
<LI><em>From</em>: "Justin McKinnerney" &lt;<A HREF="mailto:xymox#toon,org">xymox#toon,org</A>&gt;</LI>
<LI><em>Date</em>: Mon, 6 Apr 1998 08:29:56 -0400</LI>
<LI><em>Importance</em>: Normal</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
&gt; -----Original Message-----
&gt; From: mud-dev [<A  HREF="mailto:mud-dev#null,net]On">mailto:mud-dev#null,net]On</A> Behalf Of Nathan F Yospe
&gt; Sent: Sunday, April 05, 1998 7:46 PM
&gt; To: mud-dev#null,net
&gt; Subject: [MUD-Dev] Re: MUD Development Digest
&gt;
&gt; [Stuff deleted]
&gt;
&gt; Just to note that I use a mixed approach, with my own memory management...
I
&gt; have not gotten enough of the engine done to give it a real test, but...
it
&gt; seems that reliance of system paging is a doomed approach, unless you are
&gt; very careful about how you allocate memory. Likewise, writing small bits
to
&gt; disk is going to slow everything down. This can be sidestepped by
offloading
&gt; the writing of small bits to a seperate thread, but... writing big chunks
is
&gt; nice.

How would relying on system paging be a doomed approach, eactly?

It seems to me that dealing with memory managment at user level rather than
allowing the system to do it at kernel level would be far less efficent.
Espicially on the more proven operating systems (aka Solaris or IRIX).

This is beside the fact that unless you know for certain that the total size
of all running processes (and whatever tables the kernel is handling) is
definately less than the size of total physical memory (meaning you should
give yourself 8-16 megs slack in most operating systems for the file system
itself). It seems to me that it would be a pipe dream to try to make sure
everything stays running in memory only. And even if you do make sure it's
smaller, many UN*X implentations are smart about paging "dead" memory to
keep it free for running processes. The only exception that I can think of
would be Linux, where I don't think they do any smart paging to keep memory
clear for any running or potential new processes that may need it (they only
page when forced, unless smart paging is something in the 2.1 kernel?).

&gt; [Stuff deleted]
&gt;
&gt; I'm not sure what version of UN*X you are using... or which version of NT,
&gt; for that matter! This is quite the opposite of my experiences with
&gt; commercial, network serving operating systems. The threads in IRIX 6.2
seem
&gt; to work quite well, as do these Solaris threads. Heck, even the ones in
the
&gt; developer's version of Rhapsody I've testrun worked. The ones in NT 4.0
had
&gt; some itty bitty problems... like the eleventh thread and on never getting
a
&gt; reasonable share of the processor, and in fact never getting ANY of it
&gt; unless one of the others deliberately gives it up. But this is NOT the
place
&gt; for an OS war... one simple statement should suffice: If you are on
Solaris,
&gt; use threads. On IRIX, go ahead and use them, you might not be able to tell
&gt; if they are threads or processes (sorry, J C, but that's been my
experience),
&gt; and on Linux... pray. Can't speak for the others.

Yes, I agree that Solaris and IRIX threads are quite nice. However, this is
not always the case. Plus, the threads for those respective operating
systems are only supported by their respective compilers (to my knowledge,
GCC does not support the thread libraries on those platforms). And
personally, I'm a big fan of GCC.

Outside of that, however, there are other UN*X variants which aren't so nice
about threads. And some, while they are heading that way (Linux), still
aren't quite there.

Threads quite often also make debugging something of an adventure. This is
actually something I'm currently dealing with as I am doing some work on
Flight Unlimited 2. (Getting threadlock under one compiler, getting a
complete bailout on the other)

Threads *can* be quite a good thing at times, but I tend to avoid them
unless there is some specfic purpose that I can put to them. In this case,
using seprate processes for blocking IO calls is not uncommon in any way,
and is quite proven to do the job rather nicely. So I really don't see the
purpose in going so balistic to optimize that sanity be put at risk. I see
this all the time in the game industry, and is one of those things you would
think experince would have proven aginst by now. :)

As for NT, my statment wasn't that their threads are partcularly good in any
way, just that attempting to port a multi-process application to NT is a
pain in the &lt;insert favorite exclamatory here&gt;. So you're probably safer
trying to use threads under NT than trying to use their rather broken IPC
implementation.

&gt; [Stuff deleted]
&gt;
&gt; There are non-blocking disk access calls for most flavors of unix...

It's my understanding that the way this works under those un*x flavors which
support it is that it makes a request to the file system, at which point
whatever part of the file is cached is returned, and a request is queued to
cache the remainder of the file.

This seems a bit risky and has the potential of taking a long time to read a
file, since the file cache is generally the first thing to be removed from
memory when needed (and is generally removed, as paging the file cache would
be silly).

Yes, this may be reasonable with a RAID (as the file cache on the hardware
is not likely to go anywhere), but it sill has to be paged to physical
memory before it is returned to the user space, and if you are eating enough
physical memory, once again you are left with the same problem.

I would easily first recomend blocking file IO on a thread before I would
recomend non-blocking file IO. But my recomendation of blocking IO in a
seprate process still remains, as non-blocking syncronous IPC is completely
risk-free. :)

	- Justin -

&gt; Nathan F. Yospe - Aimed High, Crashed Hard, In the Hanger, Back
&gt; Flying Soon
&gt; Jr Software Engineer, Textron Systems Division (On loan to
&gt; Rocketdyne Tech)
&gt; (Temporarily on Hold) Student, University of Hawaii at Manoa,
&gt; Physics Dept.
&gt; yospe#hawaii.edu nyospe#premier.mhpcc.af.mil
<A  HREF="http://www2.hawaii.edu/~yospe/">http://www2.hawaii.edu/~yospe/</A>




</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="00082" HREF="msg00082.html">Re: [MUD-Dev] Re: MUD Development Digest</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00037" HREF="msg00037.html">Re: [MUD-Dev]  Re: MUD Development Digest</A></STRONG>
<UL><LI><EM>From:</EM> Nathan F Yospe &lt;yospe#hawaii,edu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00038.html">Re: [MUD-Dev]  GRUMPS</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00040.html">[MUD-Dev] Re: MUD Development Digest</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00037.html">Re: [MUD-Dev]  Re: MUD Development Digest</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00082.html">Re: [MUD-Dev] Re: MUD Development Digest</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00039"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00039"><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>Re: [MUD-Dev] GRUMPS</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00112" HREF="msg00112.html">Re: [MUD-Dev] GRUMPS</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Fri 10 Apr 1998, 01:37 GMT
</LI>
</ul>
</ul>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00015" HREF="msg00015.html">Re: MUD Development Digest</A></strong>, 
Dr. Cat <a href="mailto:cat#bga,com">cat#bga,com</a>, Sat 04 Apr 1998, 14:42 GMT
<UL>
<LI><strong><A NAME="00016" HREF="msg00016.html">RE: [MUD-Dev]  Re: MUD Development Digest</A></strong>, 
Justin McKinnerney <a href="mailto:xymox#toon,org">xymox#toon,org</a>, Sat 04 Apr 1998, 17:18 GMT
<UL>
<LI><strong><A NAME="00037" HREF="msg00037.html">Re: [MUD-Dev]  Re: MUD Development Digest</A></strong>, 
Nathan F Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Mon 06 Apr 1998, 06:21 GMT
<UL>
<LI><strong><A NAME="00039" HREF="msg00039.html">RE: [MUD-Dev]  Re: MUD Development Digest</A></strong>, 
Justin McKinnerney <a href="mailto:xymox#toon,org">xymox#toon,org</a>, Mon 06 Apr 1998, 12:31 GMT
<UL>
<LI><strong><A NAME="00082" HREF="msg00082.html">Re: [MUD-Dev] Re: MUD Development Digest</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 09 Apr 1998, 02:22 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00081" HREF="msg00081.html">Re: [MUD-Dev] Re: MUD Development Digest</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 09 Apr 1998, 01:48 GMT
<UL>
<LI><strong><A NAME="00088" HREF="msg00088.html">Re: [MUD-Dev] Re: MUD Development Digest</A></strong>, 
Alex Oren <a href="mailto:alexo#bigfoot,com">alexo#bigfoot,com</a>, Thu 09 Apr 1998, 11:31 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00075" HREF="msg00075.html">Re: [MUD-Dev] Re: MUD Development Digest</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 08 Apr 1998, 20:23 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>