msg00279.html

1999Q2/msg00279.html · 7.7 KB

From the archive 1999Q2.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Multi&#45;threaded mud server. -->
<!--X-From-R13: "Rnivq Praargg" <qqgNqvfpjbeyq.vzntvanel.pbz> -->
<!--X-Date: Sun, 16 May 1999 21:42:34 &#45;0700 -->
<!--X-Message-Id: 199905162117020876.3FBA3FEA#discworld,imaginary.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.4.10.9905162033590.4142&#45;100000@drpc&#45;jrn.res.st&#45;and.ac.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:ddt#discworld,imaginary.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="msg00278.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00280.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00307.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00338.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00279">Author</A>
&nbsp;|&nbsp;<A HREF="#00279">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00279">Thread</A>
&nbsp;]

<!--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>: "David Bennett" &lt;<A HREF="mailto:ddt#discworld,imaginary.com">ddt#discworld,imaginary.com</A>&gt;</LI>
<LI><em>Date</em>: Sun, 16 May 1999 21:17:02 -0700</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 5/16/99, at 8:42 PM, Ross Nicoll wrote: 

&gt;Now, the tricky bit is making sure that the database is not being modified
&gt;and read from at the same time (modifying the tree during a read could be
&gt;seriously bad), and also that any particular object is not being modified
&gt;and read from at the same time.
&gt;
&gt;Semaphores were the original plan, but as I understand it, this would
&gt;require a new semaphore for each object. As we're looking at 10,000+
&gt;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.

Or...  Hmmm...  You could have a pool of semaphores you grab from,
dynamically allocate them to the objects when needed and then release them
afterwards.  Actually, that is probably the easiest solution.  When you go
to access an object check to see if it has a semaphore, if not create one.
When you release, check to see if anyone is waiting on the semaphore, if
not release it...

You can also divide the objects up into groups and then do read locks and
write locks on the group as a whole.  Or (as is mentioned by Caliban)
divide the system up into tasks.

Wondering how much fluff is never enough,
David.



_______________________________________________
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>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00338" HREF="msg00338.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>
<ul compact><li><em>From:</em> Ross Nicoll &lt;rnicoll#lostics,demon.co.uk&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00270" HREF="msg00270.html">[MUD-Dev] Multi-threaded mud server.</A></STRONG>
<UL><LI><EM>From:</EM> Ross Nicoll &lt;rnicoll#lostics,demon.co.uk&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00278.html">Re: [MUD-Dev] Custom Server Roll Call?</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00280.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00307.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00338.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00279"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00279"><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>
<LI><strong><A NAME="00337" HREF="msg00337.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="00352" HREF="msg00352.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:45 GMT
<UL>
<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>
</LI>
</UL>
</LI>
</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
</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>

Site Stats

Snippets: 1791
Codebases: 571