Date: Wed, 17 May 2000 17:45:44 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: dfr@nlsystems.com (Doug Rabson) Cc: msmith@FreeBSD.ORG (Mike Smith), n_hibma@calcaphon.com (Nick Hibma), arch@FreeBSD.ORG Subject: Re: A new api for asynchronous task execution Message-ID: <200005171745.KAA06412@usr05.primenet.com> In-Reply-To: <Pine.BSF.4.21.0005150940590.47945-100000@salmon.nlsystems.com> from "Doug Rabson" at May 15, 2000 09:44:41 AM
next in thread | previous in thread | raw e-mail | index | archive | help
> I do hope to be able to replace at least some of these pieces. I like the > idea of a priority sorted list of tasks, probably using a priority field > in struct task. Bletch. This is a job best handled by managing insertion order, rather than by way of an explicit sort. Insertion order also keeps the structure both small and generic. > As Chuck noted, a queue name will be useful for initialising SMP mutexes > so I'll add that to taskqueue_init(). It should be easy to leverage that > into something like taskqueue_find(). I dislike the idea of explicit kernel mutex queues, as opposed to resource queues. The problem you run into is the inability to perform deadlock avoidance, which you would normally do by implying an edge between the top of the hierarchy into which you are inserting and the location into which you wish to insert (such an algorithm is order N+1 based on depth N and doing a reverse traversal in an attempt to detect a Hamiltonian cyclye introduced by the implication of the edge; short of caching the edge node, which would give you order N, but cost significantly, this is about the best possible algorithm you can get). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005171745.KAA06412>