Android merge with kernel 3.3

Discussion in 'all things UNIX' started by linuxforall, Mar 19, 2012.

Thread Status:
Not open for further replies.
  1. linuxforall

    linuxforall Registered Member

    Joined:
    Feb 6, 2010
    Posts:
    2,137
    https://lwn.net/Articles/472984/

    For a long time, code from the Android project has not been merged back to the Linux repositories due to disagreement between developers from both projects. Fortunately, after several years the differences are being ironed out. Various Android subsystems and features have already been merged, and more will follow in the future. This will make things easier for everybody, including the Android mod community, or Linux distributions that want to support Android programs.

    More reading on this at
    https://lwn.net/Articles/472984/

    The "low memory killer" implements Android's interesting approach to application management. In the Android world, applications never choose to exit. They hang around until memory gets tight, at which point kernel starts to kill them off. It's a small piece of code that works using the "shrinker" mechanism, a standard way to register functions to be called when the kernel would like to free up some memory. So, even though it is memory-management code, it is relatively unintrusive and will not affect systems where it is not used.
     
  2. Hungry Man

    Hungry Man Registered Member

    Joined:
    May 11, 2011
    Posts:
    9,146
    This should be interesting - thank you.
     
  3. linuxforall

    linuxforall Registered Member

    Joined:
    Feb 6, 2010
    Posts:
    2,137

    Welcome.
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,229
    Low-memory killer seems quite like out-of-memory killer.
    And it seems to be using the same logic and oom score values.
    So what's the big deal?
    Mrk
     
  5. Hungry Man

    Hungry Man Registered Member

    Joined:
    May 11, 2011
    Posts:
    9,146
    Doesn't OOM work by killing active applications when another application is taking up a ton? Like if I have pidgin in the background and Chrome up front and Chrome is taking up 7GB of my RAM it will kill Pidgin?

    In the case of Android it would keep pidgin in the background with whatever other sleeping services there are and even if I were to close pidgin it would keep it in memory... or something similar.
     
  6. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,229
    OOM kills processes with the highest score, and the metrics include total cpu time, memory footprint, virtual vs. real size, forking of children, nice, etc. So if you have something hogging 7 gb, it may not necessarily be the bad process or then again, it could.
    Mrk
     
  7. linuxforall

    linuxforall Registered Member

    Joined:
    Feb 6, 2010
    Posts:
    2,137
    The Android model uses memory efficiently, it waits for memory to fill up and then starts prioritizing apps and shutting them down at a time till there is sufficient memory, quite efficient when one has 2GB+ memory on norm these days.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.