- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Android Anatomy and Physiology
By Google IO
Android架构剖析和机能分析
翻译:JeefJiang
2009年8月14日
? Android Anatomy Android架构剖析
? Linux Kernel Linux内核
? Native Libraries 本地库
? Android Runtime Android运行时
? Application Framework 应用程序框架
? Android Physiology Android机能
? Start-up Walkthrough 启动流程
? Layer Interaction 层次交互
译者注:Android Anatomy是从静态的角度分析Android的架构,而Android Physiology是从动态的分析Android是如何启动以及各个层次是如何交互的,以下是Android的架构图。我们按照自底向下的方法来分析。
Android架构——内核:
? Android is built on the Linux kernel, but Android is not
Linux
Android是基于Linux内核,当Android本身不是Linux
? No native windowing system
没有本地的窗口系统
? No glibc support
没有Glibc的支持
? Does not include the full set of standard Linux utilities
没有包括完整的标准的Linux工具集
? Standard Linux 2.6.24 Kernel
标准的Linux2.6.24内核(笔者翻译时已经是2.6.27)
? Patch of “kernel enhancements” to support Android
为了支持Android打上了内核优化补丁
为什么使用Linux
? Great memory and process management 优越的内存和进程管理功能
? Permissions-based security model 基于权限的安全模式
? Proven driver model 被认可的驱动模式
? Support for shared libraries 支持共享库
? It?s already open source! 代码开源
内核优化
为了支持Android,Android的主线内核做了相应优化,主要体现在下面几个方面:
? Alarm
? Ashmem
? Binder
? Power Management
? Low Memory Killer
? Kernel Debugger
? Logger
Binder
为什么要引入Binder
? Applications and Services may run in separate processes but must communicate and share data
应用程序虽然以独立的进程运行,但相互之间需要通信
? IPC can introduce signi?cant processing overhead and security holes
IPC会增加进程的开销并导致安全漏洞
解决方法:
? Driver to facilitate inter-process communication (IPC) 用驱动程序来推进进程间通信
? High performance through shared memory 通过共享内存来提高性能
? Per-process thread pool for processing requests 为进程请求分配每进程线程池
? Reference counting, and mapping of object references 引用计数、跨进程的对象引用映射
across processes
? Synchronous calls between processes 进程间同步调用
Binder如何实现:
Android Interface De?nition Language (AIDL)
? /android/reference/aidl.html
Since each ap
文档评论(0)