msg00286.html
2000Q1/msg00286.html · 6.8 KB
From the archive 2000Q1.zip
Download the archive « Back to the archive contents
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD-Dev] Event Scheduling -->
<!--X-From-R13: ptNnzv-pt.UenlEntr.Sqzbagba.OP.QO -->
<!--X-Date: Tue, 08 Feb 2000 20:38:54 -0800 -->
<!--X-Message-Id: 200002090217.TAA02126@ami-cg.GraySage.Edmonton.AB.CA -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Event Scheduling</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">
</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="msg00284.html">Previous</a>
| <a href="msg00285.html">Next</a>
]
Thread:
[ <a href="msg00294.html">Previous</a>
| <a href="msg00287.html">Next</a>
]
Index:
[ <A HREF="author.html#00286">Author</A>
| <A HREF="#00286">Date</A>
| <A HREF="thread.html#00286">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Event Scheduling</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] Event Scheduling</LI>
<LI><em>From</em>: <A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A></LI>
<LI><em>Date</em>: Tue, 8 Feb 2000 19:17:54 -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>
[J C Lawrence:]
> Mine is written in C++, with a standard STL priority queue for
> pending events in botht he Dispatchor and Executor, and short
> circuit evaluation (ie never hits the priority queue) for those
> incoming entries that are adjudged as being already ripe, or will be
> ripe by the time they reach a waiting thread (if a thread is ready).
> This saves the (occassionally) non-trivial insertion cost as well as
> lock contention on the queues.
Do you handle any currently-ripe entries in the queue before any new
tasks that are immediately ripe? You likely want to do that to avoid
starvation in cases of server overload.
I didn't reply to the original question, since my event queue is simply
a sorted linked list, hence my insert time is O(n), and my delete time
is O(1). Manipulation of that queue has never shown up in my profiling,
however - it's time is tiny compared to actually executing the events.
--
Don't design inefficiency in - it'll happen in the implementation.
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA
<A HREF="http://www.GraySage.Edmonton.AB.CA/cg/">http://www.GraySage.Edmonton.AB.CA/cg/</A>
_______________________________________________
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="00287" HREF="msg00287.html">Re: [MUD-Dev] Event Scheduling</A></strong>
<ul compact><li><em>From:</em> J C Lawrence <claw#kanga,nu></li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00284.html">Re: [MUD-Dev] IO Speed Suggestions</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00285.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00294.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00287.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00286"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00286"><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] Event Scheduling</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00283" HREF="msg00283.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Tue 08 Feb 2000, 22:01 GMT
</LI>
</ul>
<LI><strong><A NAME="00278" HREF="msg00278.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 08 Feb 2000, 18:31 GMT
<UL>
<LI><strong><A NAME="00293" HREF="msg00293.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Phillip Lenhardt <a href="mailto:philen#funky,monkey.org">philen#funky,monkey.org</a>, Thu 10 Feb 2000, 17:23 GMT
<UL>
<LI><strong><A NAME="00294" HREF="msg00294.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 10 Feb 2000, 18:09 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00286" HREF="msg00286.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 09 Feb 2000, 04:38 GMT
<UL>
<LI><strong><A NAME="00287" HREF="msg00287.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Wed 09 Feb 2000, 04:53 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00285" HREF="msg00285.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Wed 09 Feb 2000, 04:38 GMT
<UL>
<LI><strong><A NAME="00289" HREF="msg00289.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Hans-Henrik Staerfeldt <a href="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</a>, Wed 09 Feb 2000, 17:44 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00290" HREF="msg00290.html">Re: [MUD-Dev] Event Scheduling</A></strong>,
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Wed 09 Feb 2000, 19:02 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>