Also the framework uses (some would say abuses) cgroups is major ways to
control scheduling -- there is a cgroup for processes it considers to be in
the "background", and threads in that cgroup can only get around 10% of the
CPU all together.  That is, foreground processes can never lose more than
10% of the CPU cycles to whatever is running in the background.

(It's not exactly 10% I don't think; I don't recall the exact number we are
currently using.)

On Tue, Dec 7, 2010 at 4:59 PM, Brad Davis <bda...@cove-mtn.com> wrote:

> Yes and no.  If all the processes were active and runnable (not
> blocked waiting for something else to happen) then yes, you would be
> sharing the CPU with all of them.  However, most of them are blocked
> for one reason or another (disk read, message, signal, UI interaction,
> another process, ...).
>
> On Dec 6, 8:58 pm, Yu <ywu...@gmail.com> wrote:
> > Hi,
> >
> > If you use 'ps' command, you will get a list of all the current
> > processes in the system - let us assume that we have n processes. My
> > question is if a new application is lauched - say Process-A, will A
> > share the CPU with all the exisiting processes in the system? So the
> > fraction of CPU for A is about 1/(n+1) - assuming they are of same
> > nice value ?
> >
> > Thanks a lot.
>
> --
> unsubscribe: 
> android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-kernel
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to