How to create a process in Android?

Why does Android create a unique VM for each process?

  • Why can't Android create a common VM and allow all apps to share that?

  • Answer:

    Security and reliability. By running each app in its own process, each app is sandboxed, separated from other apps both logically and physically. Each process needs its own VM, and thus Android runs a unique Dalvik instance for each app you run. Android actually goes even further: Each app is not only run in a unique process, but each process is owned by a unique user. This ensures not only process separation but user credential separation. Given that processes are cheap in Linux and that Dalvik's code and some of its data is sharable across processes, this model provides very strong security and reliability guarantees with little cost. It wouldn't work with the existing Unix model, but Android rethought all of that.

Robert Love at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.