[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAJd=RBA79ygaWxigMfLZkNjURg2r0DwrzKzRZytzHDMQE2XoNA@mail.gmail.com>
Date: Tue, 22 May 2012 22:04:13 +0800
From: Hillf Danton <dhillf@...il.com>
To: Chen <hi3766691@...il.com>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: BFS 420: cleanup in tick handling
On Tue, May 22, 2012 at 10:00 PM, Chen <hi3766691@...il.com> wrote:
>
> 在 2012-5-22 下午9:50,"Hillf Danton" <dhillf@...il.com>写道:
>>
>> On Tue, May 22, 2012 at 9:45 PM, Chen <hi3766691@...il.com> wrote:
>> > Actually the lowest deadline task selection algorithm now BFS used is
>> > O(n).
>> > I have already had an idea to enhance the lowest deadline task selection
>> > algorithm to O(1)
>>
>> Would you please announce it on LKML?
>
> First of all let me talk how to do it .We can use 40 list_head instead of
> the single list for time sharing scheduling policy.
> Then for task selection we will select the task from these 40
> list_head(actually not 40, just decide by next_sched_bit), then make a
> comparsion of these tasks(actually in the worse case we just need to do 40
> times of comparsion) and pick the lowest task. If a task wake, it would be
> the first node of (queue + p->prio). If a task run out of its timeslice, it
> will become the last node of(queue + p->prio). This is a concept of BFS
> deadline presort algorithm and the time complexity is O(1)
Thank you for shedding light, I will study it soon.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists