title: Is Android garbage collector pausing other apps while running?
body: <p>I've found some information about the Android garbage collector that are contradictions to me.</p>
  
  <p>Android Devevelopers Guide says:</p>
  
  <blockquote>
    <p>Android 3.0 is the first version of the platform designed to run on
    either single or multicore processor architectures. A variety of
    changes in the Dalvik VM, Bionic library, and elsewhere add support
    for symmetric multiprocessing in multicore environments. These
    optimizations can benefit all applications, even those that are
    single-threaded. For example, with two active cores, a single-threaded
    application might still see a performance boost if the Dalvik garbage
    collector runs on the second core. The system will arrange for this
    automatically."</p>
  </blockquote>
  
  <p>Ok, now the other thing</p>
  
  <p>According to this link: <a href="http://davidehringer.com/software/android/The_Dalvik_Virtual_Machine.pdf">The Dalvik Virtual Machine Architecture</a>
  android uses mark and sweep aproach.</p>
  
  <blockquote>
    <p>The current strategy in the Dalvik garbage collector is to keep mark
    bits, or the bits that indicate that a particular object is
    “reachable” and therefore should not be garbage collected, separate
    from other heap memory.</p>
  </blockquote>
  
  <p>If we check how mark and sweep works on this link:
  <a href="http://www.brpreiss.com/books/opus5/html/page424.html">Mark and Sweep Garbage Collection Algorithm</a>
  , we can see this:</p>
  
  <blockquote>
    <p>The main disadvantage of the mark-and-sweep approach is the fact that
    that normal program execution is suspended while the garbage
    collection algorithm runs. In particular, this can be a problem in a
    program that interacts with a human user or that must satisfy
    real-time execution constraints. For example, an interactive
    application that uses mark-and-sweep garbage collection becomes
    unresponsive periodically.</p>
  </blockquote>
  
  <p>So my question now is, how does it really work? Does garbage collector pause everything while he is working, or is he capable of running completely independent on the other active processor core?</p>