msg00351.html
1999Q2/msg00351.html · 8.6 KB
From the archive 1999Q2.zip
Download the archive « Back to the archive contents
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD-Dev] Multi-threaded mud server. -->
<!--X-From-R13: "Xba O. Znzoreg" <wyflfvapNvk.argpbz.pbz> -->
<!--X-Date: Sat, 29 May 1999 21:30:30 -0700 -->
<!--X-Message-Id: 199905300430.XAA25215@dfw-ix7.ix.netcom.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199905162117020876.3FBA3FEA#discworld,imaginary.com -->
<!--X-Reference: Pine.LNX.4.10.9905281955050.1646-100000#lostics,demon.co.uk -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Multi-threaded mud server.</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>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00350.html">Previous</a>
| <a href="msg00352.html">Next</a>
]
Thread:
[ <a href="msg00338.html">Previous</a>
| <a href="msg00356.html">Next</a>
]
Index:
[ <A HREF="author.html#00351">Author</A>
| <A HREF="#00351">Date</A>
| <A HREF="thread.html#00351">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Multi-threaded mud server.</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>: Re: [MUD-Dev] Multi-threaded mud server.</LI>
<LI><em>From</em>: "Jon A. Lambert" <<A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A>></LI>
<LI><em>Date</em>: Sun, 30 May 1999 00:29:39 -5</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#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 28 May 99,, Ross Nicoll wrote:
> On Sun, 16 May 1999, David Bennett wrote:
>
> > >Semaphores were the original plan, but as I understand it, this would
> > >require a new semaphore for each object. As we're looking at 10,000+
> > >objects, that's a _lot_ of semaphores.
> > Well... You could do a system that only generated a semphore when it was
> > needed... As in you have some nice bit you set in the structure for
> > reading/writing and another bit you set for being locked. Then if it goes
> > to do a normal semphore unlock and it finds that a semaphore is needed it
> > grabs it correctly. Or just waits on an event or something.
> Good idea, but unfortunately it's still possible two processes to
> simultaneously do the check, find no semaphore, and both to then try
> allocating a semaphore, at the same time. Which would just result in a
> mess, really...
>
I'm not sure what synchronization objects you have available, but...
I use Event objects when waiting for external signals (sockets and disk).
And I use Critical Sections liberally in classes, especially in Factory
classes to ensure that exclusive access is obtained until object
constructors complete. I had all kinds of problems in this area, BTW.
You might not, but it's something to look closely at. :)
I also use a variation on Critical sections called Metered Critical
Sections (there's a document describing them at www.msdn.com). Anyway
the variation, I most frequently use allows multiple readers OR one
exclusive writer.
Mutexes and Semaphores are the most expensive synchronization objects
on my platform. YMMV
I also make use of InterlockedIncrement, InterlockedDecrement, and
InterlockedExchange. What they do is allow you to provide some very
lightweight non-interruptable function access to shared variables.
--
--* Jon A. Lambert - TychoMUD Email:jlsysinc#ix,netcom.com *--
--* Mud Server Developer's Page <<A HREF="http://pw1.netcom.com/~jlsysinc">http://pw1.netcom.com/~jlsysinc</A>> *--
--* To fight the empire is to be infected by its derangement. Whosoever *--
--* defeats part of the empire becomes the empire; it proliferates like a *--
--* a virus... thereby it becomes its enemies." -- P.K. Dick *--
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
<A HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>
</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="00279" HREF="msg00279.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
<UL><LI><EM>From:</EM> "David Bennett" <ddt#discworld,imaginary.com></LI></UL></LI>
<LI><STRONG><A NAME="00338" HREF="msg00338.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
<UL><LI><EM>From:</EM> Ross Nicoll <rnicoll#lostics,demon.co.uk></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00350.html">[MUD-Dev] Dylan Programming Language</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00352.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00338.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00356.html">[MUD-Dev] Re[2]: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00351"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00351"><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] Multi-threaded mud server.</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00373" HREF="msg00373.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Ross Nicoll <a href="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</a>, Tue 01 Jun 1999, 21:03 GMT
</LI>
</ul>
</ul>
</ul>
<LI><strong><A NAME="00307" HREF="msg00307.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Wed 19 May 1999, 04:46 GMT
</LI>
</ul>
<LI><strong><A NAME="00279" HREF="msg00279.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
David Bennett <a href="mailto:ddt#discworld,imaginary.com">ddt#discworld,imaginary.com</a>, Mon 17 May 1999, 04:42 GMT
<UL>
<LI><strong><A NAME="00338" HREF="msg00338.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Ross Nicoll <a href="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</a>, Fri 28 May 1999, 21:03 GMT
<UL>
<LI><strong><A NAME="00351" HREF="msg00351.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 30 May 1999, 04:30 GMT
</LI>
<LI><strong><A NAME="00356" HREF="msg00356.html">[MUD-Dev] Re[2]: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Travis Casey <a href="mailto:efindel#io,com">efindel#io,com</a>, Sun 30 May 1999, 15:31 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00288" HREF="msg00288.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 18 May 1999, 06:31 GMT
<UL>
<LI><strong><A NAME="00304" HREF="msg00304.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>,
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 18 May 1999, 14:47 GMT
</LI>
<LI><strong><A NAME="00305" HREF="msg00305.html">[MUD-Dev] Noise: boys will be boys (was Re: [MUD-Dev] Multi-threaded mud server.)</A></strong>,
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Wed 19 May 1999, 04:29 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>