WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] Re: [PATCH] add timeouts to mini-os

To: rkaiser@xxxxxxxxx
Subject: [Xen-devel] Re: [PATCH] add timeouts to mini-os
From: Grzegorz Milos <gm281@xxxxxxxxx>
Date: Mon, 2 Oct 2006 17:44:44 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2006年10月02日 09:45:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200610021002.20818.rkaiser@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200608291442.50081.kaiser@xxxxxxxxxxxxxxxxxxxxxxxxxx> <200610010118.15960.kaiser@xxxxxxxxxxxxxxxxxxxxxxxxxx> <8B56473E-DEFD-4010-ABD5-4E1931C4BD2F@xxxxxxxxx> <200610021002.20818.rkaiser@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Which functionalities would you like to see that are currently missing?
The timers I was thinking about would follow Xen/Linux model. For each timer you would need to specify the following:
- a timeout (timestamp)
- a handler function
- if the timer is one-shot or periodic
Such timers are more flexible, but the handler function is limited in functionality by the fact that you are running in the interrupt context. Since Mini-OS doesn't maintain much state (that could be modified by a timeout timer), the only thing you would be likely doing is waking up a thread/set of threads. It therefore follows that your implementation does the same thing, but it's shorter/cleaner. In particular there is no need for timer heap or a similar datastructure.
(There are few shortcomings of my implementation that I'm well aware of myself. For instance, I think it would be more efficient to unlink blocked threads from the ready queue and keep the ones with pending timeouts in a "timeout" queue, sorted by ascending expiry date. That way, it wouldn't be necessary to walk the entire ready queue all the time to see if any timeouts have expired: it would suffice to just look at the head of the timeout queue.
However, my goal was to keep things simple and to not change more than
absolutely necessary.)
That's fine. I decided against separate lists for runnable/blocked threads for exactly the same reasons. Mini-OS is not about scalability, keeping the things as simple as possible is the main priority.
Cheers
Gregor
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] [PATCH] add printf_ratelimit , Steven Rostedt
Next by Date: Re: [Xen-devel] [PATCH][Take 3] Sysfs Interface for balloon driver , John Levon
Previous by Thread: [Xen-devel] Re: [PATCH] add timeouts to mini-os , Robert Kaiser
Next by Thread: [Xen-devel] Re: [PATCH] add timeouts to mini-os , Grzegorz Milos
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /