5

I just want to know :

  • Who created the dalvik_Vm ?

  • Is the zygote process running in the vm or contrary?

Ramkrishna Sharma
  • 6,715
  • 2
  • 37
  • 50
Zhang Xiang
  • 382
  • 2
  • 14

3 Answers3

8

Dalvik VM was authored by Dan Bornstein
Every android application runs in a separate process, has its own Dalvik VM.

Zygote is a daemon with the only mission to launch applications. This means that Zygote is the parent of all App process. When app_process launches Zygote, it creates the first Dalvik VM and calls Zygote’s main () method. Once Zygote starts, it preloads all necessary Java classes and resources, starts System Server and opens a socket /dev/socket/zygote to listen for requests for starting applications.

CodeWalker
  • 2,145
  • 4
  • 17
  • 43
2

Add some example to explain that Zygote is the parent of all App process. zygote PID : 481, my application processes PPID : 481, you can use ps command to check.

UID            PID  PPID C STIME TTY          TIME CMD
root           481     1 0 09:17:54 ?     00:00:03 zygote
u0_a132      28993   481 78 09:07:53 ?    00:23:46 com.languouang.helloworld
u0_a132      29013   481 0 09:07:53 ?     00:00:01 com.languouang.helloworld:countservice
u0_a132      29296   481 1 09:09:04 ?     00:00:09 com.languouang.helloworld:mall
u0_a132      30427   481 1 09:16:42 ?     00:00:15 com.languouang.helloworld:faq
Languoguang
  • 1,976
  • 2
  • 8
  • 14
0

Zygote actually the child of init process which occur as boot process start. It is responsible of loading Dalvik virtyal machine by which our Dalvik Bytecode get executed. Also, it preload all the necessary resource all shared java classes and resources into memory.

Ratnesh
  • 260
  • 3
  • 13