Re: thread priority ?
[email protected] (Don Cohen) Thu, 7 Dec 2017 23:02:37 +0000
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
Vladimir Tzankov writes: > I purposely avoided exposing thread priorities. I've yet to see > legit use case for playing with these. It sounds like you want me to provide such use cases. The problem is that we have a limited number of processors and a limited amount of bandwidth and other resources, but a potentially unlimited demand. When the demand exceeds the supply then I want to favor some activities over others. For instance, something a user is waiting for gets priority over something going on in the background that will ultimately generate an email report. If some users request a lot of service I'd rather have them wait for some of it than impact the service provided to other users who request much less. So, for instance, I might assign priority based on how much service a user has already received plus the estimated costs of his requests currently in the queue ahead of this one (so lower value is "higher" priority). BTW, it would be helpful to know what the priorities are allowed to be. In my example above it would be useful for them to be arbitrary numbers, but if they have to be integers in some range, I have to know what that range is, and whether higher numbers are higher or lower priority than lower numbers. I'm currently imagining that whenever two threads are both ready to run and we have capacity for only one, we take the one with higher (or lower?) priority value. Is that right? > Anyway, it's rather simple to add support for setting threads > priorities. That's what I imagined and hoped. > -- > Vlad > > On Thu, Nov 30, 2017 at 5:18 PM, Don Cohen < > [email protected]> wrote: > > > > > My impression is that threads can have priorities that affect > > scheduling. But I don't see any mention in impnotes of this. > > If it's easy (I hope so), perhaps some interfaces could be > > added to read/write/initialize the priority of a thread? ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list