msg00356.html
1999Q2/msg00356.html · 8.2 KB
From the archive 1999Q2.zip
Download the archive « Back to the archive contents
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD-Dev] Re[2]: [MUD-Dev] Multi-threaded mud server. -->
<!--X-From-R13: Fenivf Qnfrl <rsvaqryNvb.pbz> -->
<!--X-Date: Sun, 30 May 1999 08:31:19 -0700 -->
<!--X-Message-Id: 13482.990530#io,com -->
<!--X-Content-Type: text/plain -->
<!--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, [MUD-Dev] Re[2]: [MUD-Dev] Multi-threaded mud server.</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:efindel#io,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="msg00355.html">Previous</a>
| <a href="msg00357.html">Next</a>
]
Thread:
[ <a href="msg00351.html">Previous</a>
| <a href="msg00288.html">Next</a>
]
Index:
[ <A HREF="author.html#00356">Author</A>
| <A HREF="#00356">Date</A>
| <A HREF="thread.html#00356">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re[2]: [MUD-Dev] Multi-threaded mud server.</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: Ross Nicoll <<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>></LI>
<LI><em>Subject</em>: [MUD-Dev] Re[2]: [MUD-Dev] Multi-threaded mud server.</LI>
<LI><em>From</em>: Travis Casey <<A HREF="mailto:efindel#io,com">efindel#io,com</A>></LI>
<LI><em>Date</em>: Sun, 30 May 1999 11:34:31 -0400</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 Friday, May 28, 1999, 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...
That depends on your implementation. The smart thing to do would be
to set things up so there's a lock on creating semaphores -- only one
thread can create a semaphore at a time. Better would be a situation
where only one can create a semaphore of a particular *name* at a
time.
Remember -- semaphores aren't a solution to the problem of
simultaneous actions; they're just a nice way to encapsulate a
solution so that others can use it. The semaphore implementation is
still going to have to rely on blocking interrupts, passing messages,
special CPU instructions, Peterson's method, or whatever. If you
extend traditional semaphores (e.g., by allowing dynamic creation of
semaphores), you'll have to use such lower-level methods to make sure
that your extensions work.
I recall an implementation used in a textbook in which semaphores were
created when needed... what was done, though, was that when a
process/thread attached to a semaphore, the semaphore library checked
to see whether it existed and, if it didn't, created it. Since this
was done by the library, it took care of the nasty bits.
--
|\ _,,,---,,_ Travis S. Casey <efindel#io,com>
ZZzz /,`.-'`' -. ;-;;,_ No one agrees with me. Not even me.
|,4- ) )-,_..;\ ( `'-'
'---''(_/--' `-'\_)
_______________________________________________
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="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="msg00355.html">[MUD-Dev] Oh yeah...</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00357.html">Re: [MUD-Dev] Text Parsing</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00351.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00288.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00356"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00356"><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>
<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>
<LI><strong><A NAME="00310" HREF="msg00310.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>, Thu 20 May 1999, 05:11 GMT
</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>