2. Android System Boot Process

Source: Internet
Author: User



1. Boot the kernel after loading 2. Execution of init process----> Device initialization workA1. Read Inic.rc A2.  Start the zygote process----> The process is the incubator B1 for all processes.  Initializes the Dalvik virtual machine B2. Start the System_server process C1.  Send commands through the socket to the zygote process B3. Received command fork itself C1. Create an Dalvik virtual machine instance to execute the application entry function


Zygote provides 3 ways to create a process fork () creates a zygote process forkandspecialize () creates a non-zygote process forksystemserver () creates a system service process

Dalvik Virtual Machine Execution Program flow:[Virtual machine thread], [loader class], [Verify byte code], [Find main class], [Execute byte stream], [end]
1. First completion of class loading through the Loadclassfromdex () function each class successfully resolves with a classobject type of data structure that exists with the runtime Environment 2. Use the Gdvm.loadedclasses Global hash table to store queries for all load Classes 3. The bytecode validator uses the Dvmverifycodeflow () function to verify the loaded code 4. Call Findclass () Find and load the Main method Class 5. Call the Dvminterpret () function to initialize the interpreter and execute the byte stream

The JIT for Dalvik virtual machines (just in time compilation) is the mainstream of JIT with 2 bytecode compilation methods 1. Method: Compile 2 as a function or a method. Trace mode: A branch of code that is compiled in trace for frequent execution caches




















From for notes (Wiz)

2. Android System Boot Process

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.