2012/4/23 DK <kanis...@gmail.com>:
> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel
--
Regards,
Gaggery
Thanks Deborah,
What are these five files - sched.c, sched.h, sched_fair.c ??
Yes, rbtree sorts according to vruntime, and smallest is the left most
node and the scheduler just selects the left most node. right?
Any ideas on how to add a process to the rbtree?
usually when a user starts a process it is added, right?
In my case user has not accessed the process yet? wants it to be in the rbtree so that process starts
quickly when the user starts the process.
Thanks for the reply.
Sori for the miss understanding. init.rc won't work I guess. I want
some thing done at the kernel level(scheduler) I mean like telling the
scheduler about a process and the scheduler adding it to the red-black
tree of the CFS.
Regards,
Kanishka
Thanks for the reply and the reference link,
What I want to do is something like this, tell the scheduler about a
process(which is not started yet) and the scheduler adding it to the
rbtree. Any reference material you know of achieving this?
Regards,
Kanishk
On 4/24/12, Deborah Falcone <falcone...@gmail.com> wrote:
> Hi Kanishka,
>
> Thanks Deborah,
>>
>> What are these five files - sched.c, sched.h, sched_fair.c ??
>>
>>
> I read part of Android source code and I find notice about scheduler
> in *sched.h,
> sched_policy.h, sched_policy.c*!
>
> file:///C:/Users/Deborah/Desktop/SCHEDULER%20ANDROID/scheduler%20-%20Android%20Process%20Scheduling%20-%20Stack%20Overflow.htm
> here there is information about difference between Android and Linux CFS's
> implementation.
>
>
>> Yes, rbtree sorts according to vruntime, and smallest is the left most
>> node and the scheduler just selects the left most node. right?
>>
>
> It's rigth. The key is: *vruntime - min_vruntime*.
>
>
>>
>> Any ideas on how to add a process to the rbtree?
>
>
> The metod that add a process to runqueue is put_prev_task.
>
>
>> usually when a user starts a process it is added, right?
>
>
> It's rigth!
>
>
>> In my case user has not accessed the process yet? wants it to be in the
>> rbtree so that process starts
>> quickly when the user starts the process.
>>
>> I don't know how this can be done.
>
> Regards,
> Deborah
>
2012/4/25 Kanishka Ariyapala <kanis...@gmail.com>:
My final year project is a context-aware OS, which is too big to
handle so I scaled it down to only one aspect of the OS, scheduling.
So am trying to achieve context-aware scheduling. I want to give
priority to certain applications depending on the context, such as
home, office, driving etc. I will predefine what applications will be
run in these contexts. So when you are in that context these
applications have high priority and others have low priority. How ever
the user may not have started the application yet, so I THOUGHT that
if by keeping it in the run queue(rbtree) I will get better start up
time and responsiveness.
My goal is to make those processes(apps defined for that context) in
the running sate(high priority) ready to be run(when the user clicks
on it) and to decrease the priority of other apps(not defined for that
contexts) along with the other normal OS processes.
I plan to collect the data for context using the sensor's in the
Android, for the beginning with the GPS.
In your questions you have attacked the exact point I want! "a tweak
to the scheduler algorithms to create the desired scheduling effect
once the process comes into existence." under a particular context.
So far I have been trying to understand the scheduling process and was
looking for a way to add a process to the scheduler, but it is not
that simple because a have initialize data structures(like
task_struct) and then to be put in to the rbtree. Also to make it the
left most node as far as possible.
In your opinion how do you think I should proceed?
Regards,
Kanishka
However what I am trying to achieve is context-aware scheduling. By
context I mean office, home, driving etc. So under that context to
pre-schedule some applications I have predefined for those contexts,
or give high priority(for this you need to have this in the run
queue,rty?) and give other user applications low priority.
How do you think I should approach this?
Also I have some trouble with debugging the kernel, you need to use
printk to print data structures, process flow etc, rty? have you used
it or do u have any idea? or any other way of achieving this?
Regards,
Kanishka
> However what I am trying to achieve is context-aware scheduling. By
> context I mean office, home, driving etc. So under that context to
> pre-schedule some applications I have predefined for those contexts,
> or give high priority(for this you need to have this in the run
> queue,rty?) and give other user applications low priority.
I would be tremendously surprised if the delay at startup had
much to do with scheduling, rather than latencies related to
demand-paging the program into memory.