Thanks Tim for the detailed answer and the questions. It shed some
light on me too. I didn't tell why I wanted to pre -schedule a
process.

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
On 4/24/12, Tim Bird <[email protected]> wrote:
> On 04/24/2012 10:12 AM, Kanishka Ariyapala wrote:
>> Hi Deborah,
>>
>> 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?
> I don't think there's any way (currently) to accomplish this.
>
> The scheduler only works with processes that exist.  There's
> no notion that I'm aware of to "pre-schedule" a process, before
> any of the kernel data structures for it exist.
>
> Sorry, but I came into the middle of the discussion.  What
> are you actually trying to accomplish?  Do you want some historical
> information about the process, or about systemwide scheduling
> to be present at the time the process eventually gets started?
> Is the process starting too slowly?  Are you trying to adjust
> the priority of other processes, as if the non-existent one
> were already present in the system?
>
> Maybe what you need, instead of a placeholder for a non-existent
> process, is just a tweak to the scheduler algorithms to create the
> desired scheduling effect once the process comes into existence.
> It really doesn't make sense to make the scheduler aware of
> a process that doesn't exist.  IMHO, you need to think of a different
> way to attack whatever problem you're trying to address.
>
>  -- Tim
>
> =============================
> Tim Bird
> Architecture Group Chair, CE Workgroup of the Linux Foundation
> Senior Staff Engineer, Sony Network Entertainment
> =============================
>
> --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-kernel

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel

Reply via email to