Re: [openbeos] Re: GSoC ticket #1069 (thread scheduler) application
Ingo Weinhold <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> Thu, 12 Apr 2007 03:48:56 +0200
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2007-04-12 at 02:14:27 [+0200], André Braga <[email protected]> wrote: > On 4/11/07, Ingo Weinhold <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> wrote: [...] > > Let me clarify: "cache" would be a slab allocator cache, i.e. completely > > opaque to you. Your only interface with it (besides general cache > > un-/initialization) would be the functions to allocate and free a > > structure. > > You wouldn't write any allocation or caching code. > > Considering we still don't have a slab allocator in place... True enough, but we *really* want to have one. So, you can just use wrapper macros or inline functions where you would want to do those special allocations, and they can easily be replaced later, when the allocator is available. > And > considering the fact that I still need some algorithm to allocate > "alike" threads close to each other... Anyway, this is of secondary > importance. Unless you've lots of potential groups (which would probably be counter-productive anyway), you could use a cache per group. > > Out of curiosity, what would the criterion for those "alike" threads be? > > Similar priority? Same team? > > I don't know. It's always tentative, always heuristic, since those > things tend to change all the time. Some experimentation is needed to > see which approach is more effective. The intention is to > automagically fetch the information about the next thread we're going > to schedule, but since we don't know that information, it's just > tentative, an educated guess. But similar priority and same team are > on the top of that list, for sure. Especially in the real-time case. OK, I was just wondering. Since the scheduler runs with interrupts disabled, you'd have to allocate thread-related structures at thread creation time, which kind of limits what criteria you can actually use. > Now, really, stop worrying about it, this is all bit brushing. It > would be a bonus in case it's doable in a timely fashion, but don't > worry. I was just blabbering around ;) Nah, I'm not worrying. You asked for feedback and I'm trying to give some, even if it's only bitching about details. :-) CU, Ingo ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV