热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

androidprocesscode,AndroidOSbootprocess

原标题:AndroidOSbootprocessZygoteisaspecialAndroidOSprocessthatenablessharedcodeacross

原标题:Android OS boot process

a7f0c590c0a8a2df0b65bb8d85b53723.png

Zygoteis a special Android OS process that enables shared code across Dalvik/Art VM in contrast with Java VM where each instance has its own copy of core library class files and heap objects.

Efficient and fast app launch is achieved thanks to the fact that Zygote starts by preloading all classes and resources which an app may potentially need at runtime into the system’s memory. It then listens for connections on its socket for requests to start new apps. When it gets a request to start an app, it forks itself and launches the new app. It serves as a parent to all Android apps.

This forking feature comes from the Linux kernel implementation of copy-on-write resource management technique. Forking involves creating a new process that is an exact copy of the parent process. It doesn’t actually copy anything, instead it maps pages of the new process over to those of the parent process and makes copies only when the new process writes to a page. All processes started from Zygote use their own copy and only one copy of the system classes and the resources that are already loaded in the system memory.

Zygote is designed not only to respond to fork requests by new apps, but there is one process that Zygote actually starts explicitly and that is the System Server process.返回搜狐,查看更多

责任编辑:



推荐阅读
author-avatar
手机用户2502871605
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有