Question

I would like to have a few Zygote processes in Android running in parallel. Is it supported with the current sources?

If not what can I do to support it?

Was it helpful?

Solution

There would be little value in doing this on the current system.

All app processes are forked from the zygote process. Once forked, they are independent processes each running their own copy of the Dalvik virtual machine. The act of forking a new process is fast enough that you wouldn't gain anything by doing it in parallel.

You would reduce or lose many of the advantages of zygote, notably the sharing of a large chunk of the native and managed heap (via the Linux copy-on-write page handling).

The only value in having multiple zygotes would be if you needed different app processes to have radically different properties.

If you wanted to do this, you'd need to launch the different zygotes from initd and then provide a way for system_server to contact them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top