ANDROID MALWARE
This book is based on our years-long research conducted to systematically analyze
emerging Android malware. Some of our earlier research results and findings were
reported in an IEEE conference paper entitled Dissecting Android Malware:
Characterization and Evolution, which was presented at the IEEE Symposium on
Security and Privacy (often mentioned as Oakland conference in the security
community) in May, 2012 [77]. During and after the conference, we were pleased
to receive and hear inquiries from colleagues with encouraging comments on the
systematization of knowledge work that has been conducted in our conference
paper. Partially because of that, we are motivated to expand our work and hope
such efforts will be of service to the security and privacy community. Further, as
part of that, we have released corresponding malware dataset for our study under
the name Android Malware Genome Projectto the community.
With that, we want to take this opportunity to thank our collaborators, Dongyan
Xu, Peng Ning, Xinyuan Wang, Shihong Zou, and others, whose valuable insights
and comments greatly enriched our work. The authors are also grateful to colleagues in the Cyber Defense Lab at NC State University, especially Tyler Bletsch,
Zhi Wang, Michael Grace, Deepa Srinivasan, Minh Q. Tran, Chiachih Wu, Wu
Zhou, and Kunal Patel. Special thanks also go to Susan Lagerstrom-Fife and our
publisher for their great help and patience!
This research was supported in part by the US National Science Foundation
(NSF) under Grants 0855297, 0855036, 0910767, and 0952640. Any opinions,
findings, and conclusions or recommendations expressed in this material are those
of the authors and should not be interpreted as necessarily representing the official
policies or endorsements, either expressed or implied, for the NSF.
1 Introduction ........................................ 1
2 A Survey of Android Malware........................... 3
2.1 Malware Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Malware Characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.1 Malware Installation . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.2 Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.3 Malicious Payloads . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.4 Permission Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 Case Studies ........................................ 21
3.1 Malware I: Plankton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1.1 Phoning Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1.2 Dynamic Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2 Malware II: DroidKungFu . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.1 Root Exploits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.2 Command and Control (C&C) Servers . . . . . . . . . . . . . 24
3.2.3 Payloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2.4 Obfuscation, JNI, and Others . . . . . . . . . . . . . . . . . . . . 26
3.3 Malware III: AnserverBot. . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3.1 Anti-Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.3.2 Command and Control (C&C) Servers . . . . . . . . . . . . . 28
4 Discussion.......................................... 31
5 Additional Reading................................... 33
5.1 Books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.1.1 Malware Detection and Defense . . . . . . . . . . . . . . . . . . 33
5.1.2 Smartphone (Apps) Security. . . . . . . . . . . . . . . . . . . . . 34
5.2 Conference and Workshop Proceedings . . . . . . . . . . . . . . . . . . 34
ix
6 Summary........................................... 37
References............................................ 39
Index ................................................ 43
Android Application Security Essentials
Table of Contents
Preface 1
Chapter 1: The Android Security Model – the Big Picture 7
Installing with care 7
Android platform architecture 9
Linux kernel 9
Middleware 11
Dalvik virtual machine 11
Application layer 11
Android application structure 12
Application signing 15
Data storage on the device 15
Crypto APIs 16
Device Administration 17
Summary 17
Chapter 2: Application Building Blocks 19
Application components 19
Activity 20
Activity declaration 20
Saving the Activity state 21
Saving user data 23
Service 23
Service declaration 24
Service modes 25
Lifecycle management 26
Binder 28
Content Provider 29
Provider declaration 30
Other security consideration 33
Table of Contents
[ii ]
Broadcast Receiver 34
Receiver declaration 35
Secure sending and receiving broadcasts 36
Local broadcasts 37
Intents 38
Explicit Intents 40
Implicit Intent 41
Intent Filter 42
Pending Intent 42
Summary 43
Chapter 3: Permissions 45
Permission protection levels 45
Application level permissions 53
Component level permissions 54
Activity 54
Service 54
Content Provider 55
Broadcast Receiver 56
Extending Android permissions 57
Adding a new permission 57
Creating a permission group 58
Creating a permission tree 59
Summary 60
Chapter 4: Defining the Application's Policy File 61
The AndroidManifest.xml file 61
Application policy use cases 66
Declaring application permissions 66
Declaring permissions for external applications 67
Applications running with the same Linux ID 68
External storage 70
Setting component visibility 72
Debugging 73
Backup 74
Putting it all together 74
Example checklist 75
Application level 76
Component level 77
Summary 78
Table of Contents
[iii ]
Chapter 5: Respect Your Users 79
Principles of data security 80
Confidentiality 80
Integrity 81
Availability 81
Identifying assets, threats, and attacks 81
What and where to store 86
End-to-end security 87
The mobile ecosystem 88
Three states of data 90
Digital rights management 92
Summary 95
Chapter 6: Your Tools – Crypto APIs 97
Terminology 98
Security providers 99
Random number generation 100
Hashing functions 101
Public key cryptography 103
RSA 104
Key generation 105
Encryption 105
Decryption 106
Padding 106
The Diffie-Hellman algorithm 106
Symmetric key cryptography 108
Stream cipher 109
Block cipher 110
Block cipher modes 111
Electronic Code Book (ECB) 111
Cipher Block Chaining (CBC) 112
Cipher Feedback Chaining (CFB) 113
Output Feedback Mode (OFB) 114
Advanced Encryption Standard (AES) 115
Message Authentication Codes 116
Summary 117
Chapter 7: Securing Application Data 119
Data storage decisions 120
Privacy 120
Data retention 121
Implementation decisions 121
Table of Contents
[iv ]
User preferences 123
Shared preferences 123
Creating a preference file 123
Writing preference 124
Reading preference 124
Preference Activity 125
File 125
Creating a file 126
Writing to a file 126
Reading from a file 126
File operations on an external storage 127
Cache 128
Database 129
Account manager 131
SSL/TLS 132
Installing an application on an external storage 133
Summary 136
Chapter 8: Android in the Enterprise 137
The basics 138
Understanding the Android ecosystem 138
Device administration capabilities 139
Device administration API 140
Policies 141
DeviceAdminReceiver 142
Protecting data on a device 145
Encryption 146
Backup 147
Secure connection 147
Identity 148
Next steps 149
Device specific decisions 149
Knowing your community 151
Defining boundaries 151
Android compatibility program 151
Rolling out support 152
Policy and compliance 153
FINRA 153
Android Update Alliance 154
Summary 154
Table of Contents
[v ]
Chapter 9: Testing for Security 155
Testing overview 156
Security testing basics 158
Security tenets 158
Security testing categories 160
Application review 160
Manual testing 161
Dynamic testing 161
Sample test case scenarios 161
Testing on the server 161
Testing the network 162
Securing data in transit 162
Secure storage 162
Validating before acting 162
The principle of least privilege 163
Managing liability 163
Cleaning up 164
Usability versus security 164
Authentication scheme 164
Thinking like a hacker 164
Integrating with caution 164
Security testing the resources 165
OWASP 165
Android utilities 165
Android Debug Bridge 165
Setting up the device 166
SQlite3 166
Dalvik Debug Monitor Service 167
BusyBox 167
Decompile APK 168
Summary 169
Chapter 10: Looking into the Future 171
Mobile commerce 172
Product discovery using a mobile device 172
Mobile payments 173
Configurations 173
PCI Standard 175
Point of Sale 176
Proximity technologies 178
Social networking 178
Table of Contents
[vi ]
Healthcare 180
Authentication 180
Two-factor authentication 180
Biometrics 181
Advances in hardware 182
Hardware security module 183
TrustZone 184
Mobile trusted module 185
Application architecture 185
Summary 186
Index 187
Android系统源代码情景分析光盘
Android系统源代码情景分析光盘资料
目录
第1篇初识Android系统
第1章 准备知识................................................................ 2
1.1 Linux内核参考书籍.................................................. 2
1.2 Android应用程序参考书籍....................................... 3
1.3 下载、编译和运行Android源代码........................... 3
1.3.1 下载Android源代码........................................... 4
1.3.2 编译Android源代码........................................... 4
1.3.3 运行Android模拟器........................................... 5
1.4 下载、编译和运行Android内核源代码............................................................ 6
1.4.1 下载Android内核源代码................................... 6
1.4.2 编译Android内核源代码................................... 7
1.4.3 运行Android模拟器........................................... 8
1.5 开发第一个Android应用程序................................... 8
1.6 单独编译和打包Android应用程序模块.......................................................... 11
1.6.1 导入单独编译模块的mmm命令............................................................... 11
1.6.2 单独编译Android应用程序模块............................................................... 12
1.6.3 重新打包Android系统镜像文件............................................................... 12
第2章 硬件抽象层....................................................... 13
2.1 开发Android硬件驱动程序..................................... 14
2.1.1 实现内核驱动程序模块.................................. 14
2.1.2 修改内核Kconfig文件...................................... 21
2.1.3 修改内核Makefile文件..................................... 22
2.1.4 编译内核驱动程序模块.................................. 22
2.1.5 验证内核驱动程序模块.................................. 23
2.2 开发C可执行程序验证Android硬件驱动程序............................................... 24
2.3 开发Android硬件抽象层模块................................. 26
2.3.1 硬件抽象层模块编写规范............................... 26
2.3.2 编写硬件抽象层模块接口............................... 29
2.3.3 硬件抽象层模块的加载过程........................... 33
2.3.4 处理硬件设备访问权限问题........................... 36
2.4 开发Android硬件访问服务..................................... 38
2.4.1 定义硬件访问服务接口.................................. 38
2.4.2 实现硬件访问服务.......................................... 39
2.4.3 实现硬件访问服务的JNI方法.......................... 40
2.4.4 启动硬件访问服务.......................................... 43
2.5 开发Android应用程序来使用硬件访问服务.................................................. 44
第3章 智能指针............................................................... 49
3.1 轻量级指针............................................................. 50
3.1.1 实现原理分析................................................ 50
3.1.2 应用实例分析................................................ 53
3.2 强指针和弱指针..................................................... 54
3.2.1 强指针的实现原理分析.................................. 55
3.2.2 弱指针的实现原理分析.................................. 61
3.2.3 应用实例分析................................................ 67
第2篇Android专用驱动系统
第4章 Logger日志系统............................................. 74
4.1 Logger日志格式....................................................... 75
4.2 Logger日志驱动程序.............................................. 76
4.2.1 基础数据结构................................................ 77
4.2.2 日志设备的初始化过程.................................. 78
4.2.3 日志设备文件的打开过程............................... 83
4.2.4 日志记录的读取过程...................................... 84
4.2.5 日志记录的写入过程...................................... 88
4.3 运行时库层日志库................................................. 93
4.4 C/C++日志写入接口............................................. 100
4.5 Java日志写入接口................................................ 104
4.6 Logcat工具分析..................................................... 110
4.6.1 基础数据结构.............................................. 111
4.6.2 初始化过程.................................................. 115
4.6.3 日志记录的读取过程.................................... 127
4.6.4 日志记录的输出过程.................................... 132
第5章 Binder进程间通信系统............................... 144
5.1 Binder驱动程序..................................................... 145
5.1.1 基础数据结构.............................................. 146
5.1.2 Binder设备的初始化过程.............................. 164
5.1.3 Binder设备文件的打开过程.......................... 165
5.1.4 Binder设备文件的内存映射过程............................................................ 166
5.1.5 内核缓冲区管理........................................... 173
5.2 Binder进程间通信库............................................. 183
5.3 Binder进程间通信应用实例................................. 188
5.4 Binder对象引用计数技术..................................... 196
5.4.1 Binder本地对象的生命周期.......................... 197
5.4.2 Binder实体对象的生命周期.......................... 201
5.4.3 Binder引用对象的生命周期.......................... 204
5.4.4 Binder代理对象的生命周期.......................... 209
5.5 Binder对象死亡通知机制..................................... 212
5.5.1 注册死亡接收通知........................................ 213
5.5.2 发送死亡接收通知........................................ 216
5.5.3 注销死亡接收通知........................................ 221
5.6 Service Manager的启动过程.................................. 224
5.6.1 打开和映射Binder设备文件.......................... 226
5.6.2 注册为Binder上下文管理者.......................... 227
5.6.3 循环等待Client进程请求............................... 231
5.7 Service Manager代理对象的获取过程........................................................... 238
5.8 Service组件的启动过程........................................ 244
5.8.1 注册Service组件............................................ 245
5.8.2 启动Binder线程池......................................... 289
5.9 Service代理对象的获取过程................................ 291
5.10 Binder进程间通信机制的Java接口............................................................. 300
5.10.1 Service Manager的Java代理对象的获取过程.......................................... 300
5.10.2 Java服务接口的定义和解析.................................................................. 310
5.10.3 Java服务的启动过程.................................... 313
5.10.4 Java服务代理对象的获取过程.............................................................. 320
5.10.5 Java服务的调用过程.................................... 323
第6章 Ashmem匿名共享内存系统.............................................................. 327
6.1 Ashmem驱动程序................................................. 328
6.1.1 基础数据结构.............................................. 328
6.1.2 匿名共享内存设备的初始化过程........................................................... 330
6.1.3 匿名共享内存设备文件的打开过程....................................................... 332
6.1.4 匿名共享内存设备文件的内存映射过程................................................ 334
6.1.5 匿名共享内存块的锁定和解锁过程....................................................... 336
6.1.6 匿名共享内存块的回收过程.................................................................. 344
6.2 运行时库cutils的匿名共享内存访问接口.................................................... 345
6.3 匿名共享内存的C++访问接口............................. 349
6.3.1 MemoryHeapBase......................................... 349
6.3.2 MemoryBase................................................. 359
6.3.3 应用实例..................................................... 364
6.4 匿名共享内存的Java访问接口............................. 370
6.4.1 MemoryFile.................................................. 370
6.4.2 应用实例..................................................... 375
6.5 匿名共享内存的共享原理.................................... 386
第3篇Android应用程序框架
第7章 Activity组件的启动过程............................. 392
7.1 Activity组件应用实例............................................ 392
7.2 根Activity组件的启动过程.................................... 398
7.3 子Activity组件在进程内的启动过程............................................................ 432
7.4 子Activity组件在新进程中的启动过程........................................................ 440
第8章 Service组件的启动过程............................ 443
8.1 Service组件应用实例............................................. 443
8.2 Service组件在新进程中的启动过程............................................................. 451
8.3 Service组件在进程内的绑定过程................................................................. 463
第9章 Android系统广播机制................................. 486
9.1 广播机制应用实例............................................... 487
9.2 广播接收者的注册过程........................................ 493
9.3 广播的发送过程................................................... 501
第10章 Content Provider组件的实现原理................................................. 524
10.1 Content Provider组件应用实例........................... 525
10.1.1 ArticlesProvider........................................... 525
10.1.2 Article......................................................... 535
10.2 Content Provider组件的启动过程................................................................ 550
10.3 Content Provider组件的数据共享原理........................................................ 573
10.3.1 数据共享模型............................................. 573
10.3.2 数据传输过程............................................. 576
10.4 Content Provider组件的数据更新通知机制................................................ 596
10.4.1 注册内容观察者.......................................... 597
10.4.2 发送数据更新通知...................................... 603
第11章 Zygote和System进程的启动过程................................................. 611
11.1 Zygote进程的启动脚本........................................ 611
11.2 Zygote进程的启动过程........................................ 614
11.3 System进程的启动过程....................................... 622
第12章 Android应用程序进程的启动过程................................................. 630
12.1 应用程序进程的创建过程.................................. 630
12.2 Binder线程池的启动过程................................... 639
12.3 消息循环的创建过程.......................................... 641
第13章 Android应用程序的消息处理机制................................................. 645
13.1 创建线程消息队列............................................. 645
13.2 线程消息循环过程............................................. 650
13.3 线程消息发送过程............................................. 655
13.4 线程消息处理过程............................................. 660
第14章 Android应用程序的键盘消息处理机制....................................... 667
14.1 键盘消息处理模型............................................. 667
14.2 InputManager的启动过程.................................... 670
14.2.1 创建InputManager...................................... 670
14.2.2 启动InputManager...................................... 673
14.2.3 启动InputDispatcher.................................... 675
14.2.4 启动InputReader........................................ 677
14.3 InputChannel的注册过程..................................... 688
14.3.1 创建InputChannel....................................... 689
14.3.2 注册Server端InputChannel........................... 697
14.3.3 注册系统当前激活的应用程序窗口..................................................... 701
14.3.4 注册Client端InputChannel........................... 706
14.4 键盘消息的分发过程.......................................... 709
14.4.1 InputReader获得键盘事件........................... 710
14.4.2 InputDispatcher分发键盘事件............................................................... 717
14.4.3 系统当前激活的应用程序窗口获得键盘消息....................................... 727
14.4.4 InputDispatcher获得键盘事件处理完成通知......................................... 743
14.5 InputChannel的注销过程..................................... 746
14.5.1 销毁应用程序窗口...................................... 747
14.5.2 注销Client端InputChannel........................... 756
14.5.3 注销Server端InputChannel........................... 758
第15章 Android应用程序线程的消息循环模型....................................... 764
15.1 应用程序主线程消息循环模型.......................... 765
15.2 与界面无关的应用程序子线程消息循环模型.......................................... 766
15.3 与界面相关的应用程序子线程消息循环模型.......................................... 769
第16章 Android应用程序的安装和显示过程............................................ 778
16.1 应用程序的安装过程......................................... 778
16.2 应用程序的显示过程.......................................... 814
Hello, Android: Introducing Googles Mobile Development Platform
Paperback: 228 pages
Publisher: Pragmatic Bookshelf; 1 edition (January 4, 2009)
Language: English
ISBN-10: 1934356174
ISBN-13: 978-1934356173
Android is a new software toolkit for mobile phones, created by Google and the Open Handset Alliance. In a few years, it's expected to be found inside millions of cell phones and other mobile devices, making Android a major platform for application developers. That could be your own program running on all those devices.
Getting started developing with Android is easy. You don't even need access to an Android phone, just a computer where you can install the Android SDK and the phone emulator that comes with it. Within minutes, "Hello, Android" will get you creating your first working application: Android's version of "Hello, World."
From there, you'll build up a more substantial example: an Android Sudoku game. By gradually adding features to the game throughout the course of the book, you'll learn about many aspects of Android programming including user interfaces, multimedia, and the Android life cycle.
If you're a busy developer who'd rather be coding than reading about coding, this book is for you. To help you find what you need to know fast, each chapter ends with "Fast forward" section. These sections provide guidance for where you should go next when you need to read the book out of order.
Android Apps Security
Android Apps Security
Decompiling Android
Decompiling Android looks at the the reason why Android apps can be decompiled to recover their source code, what it means to Android developers and how you can protect your code from prying eyes. This is also a good way to see how good and bad Android apps are constructed and how to learn from them in building your own apps.
This is becoming an increasingly important topic as the Android marketplace grows and developers are unwittingly releasing the apps with lots of back doors allowing people to potentially obtain credit card information and database logins to back-end systems, as they don’t realize how easy it is to decompile their Android code.
In depth examination of the Java and Android class file structures
Tools and techniques for decompiling Android apps
Tools and techniques for protecting your Android apps
What you’ll learn
How to download an Android app and decompile it into its original Java source and HTML5 and CSS code
How to protect your Android apps so that others cannot decompile it
To identify potential security threats that currently exist and how to avoid them
What tools are available to decompile and protect Android apps
The structure of a Java Classfile and an Android classfile
How the standard JVM and the Dalvik JVM differ
How to create your own Android decompiler and obfuscator
Who this book is for
This book is for Android developers and their managers. It's also for hackers and hobbyist types who wish to see how Android apps are constructed as a means of learning how to build Android apps.
Android开发三剑客——UML、模式与测试 代码资源包
上篇 UML
第1章 项目分析
1.1 为什么要选择Android多线程断点续传下载器作为本书讲解UML时的项目
1.2 细致剖析Android多线程断点续传下载器
第2章 UML与StarUML简介
2.1 UML介绍
2.2 安装StarUML
2.3 StarUML入门
第3章 UML图
3.1 UML用例图
3.2 UML类图
3.3 UML对象图
3.4 UML组件图
3.5 UML部署图
3.6 UML时序图
3.7 UML协作图
3.8 UML状态图
3.9 UML活动图
中篇 模 式
第4章 针对接口编程
4.1 针对接口编程——问世间情为何物,直教人生死相许
4.2 Android与针对接口编程原则
第5章 设计原则
5.1 单一职责原则——乔峰VS慕容复
5.2 开放封闭原则——孙悟空任弼马温一职
5.3 里氏代换原则——法海捉拿白蛇新解
5.4 迪米特法则——慈禧太后为何不和陌生人说话
5.5 合成聚合复用原则——刘邦VS韩信
第6章 设计模式
6.1 简单工厂模式——一见钟情的代价
6.2 工厂方法模式——让麦当劳的汉堡适合不同MM的不同口味
6.3 抽象工厂模式——MM的生日
6.4 单例模式——你是我的唯一
6.5 原型模式——肉麻情话
6.6 建造者模式——让我们同居吧
6.7 装饰模式——见MM的家长
6.8 外观模式——MM也迷恋炒股
6.9 享元模式——短信可以这样发
6.10 适配器模式——笔记本电脑的适配器
6.11 代理模式——QQ聊天机器人
6.12 桥接模式——最重要的是有一颗让MM快乐的心
6.13 组合模式——MM的生日礼物
6.14 模板方法模式——人的一生应该这样度过
6.15 观察者模式——GG在MM身边有两个妹妹
6.16 状态模式——在一天的不同时间要给MM发不同的短信
6.17 策略模式——帮助MM选择商场打折策略
下篇 测 试
第7章 Android中的单元测试入门
7.1 Android中的单元测试初体验
7.2 Android中的单元测试的必要性
7.3 Android中的单元测试的框架JUnit
7.4 剖析我们的第一个单元测试程序
第8章 Android JUnit测试的生命周期
8.1 JUnit用例生命周期分析
8.2 JUnit用例生命周期实战
8.3 JUnit测试用例不向测试框架抛出异常该怎么处理
第9章 Android单元测试案例实战
9.1 测试数组
9.2 测试堆栈
9.3 测试文件系统
9.4 如何测试private方法
第10章 Android中单元入门测试
10.1 测试套件TestSuite
10.2 自动化测试实战
第11章 JUnit与模式
11.1 JUnit与模板方法模式
11.2 JUnit与适配器模式
11.3 JUnit与组合模式
第12章 JUnit源码剖析
12.1 以TestCase抽象类为核心剖析Junit源代码
12.2 以TestSuite类为核心剖析Junit源代码
附录A 如何成为Android高手V2.0:结合云计算和智能终端、软/硬件整合
Android项目实战——手机安全卫士开发案例解析(光盘)
Android项目实战——手机安全卫士开发案例解析书的光盘资料
linux操作系统内核技术-uestc课件
教学内容与要求
1掌握处理器在进程地址空间上的三种运行位置,了解内核编程不能使用C库函数和FPU,以及可能产生内存故障、核心栈溢出和四种内核竞争情形的原因。(2学时)
2熟悉进程描述符的组织,进程上下文和进程状态转换,和fork,exec,wait,exit,clone,linux线程和内核线程的实现原理和应用。了解COW和避免出现孤儿进程技术。(4小时)
3介绍支持SMP的O(1)调度,用户和内核抢占和进程上下文切换,了解优先级复算,睡眠和唤醒机制,SMP的负载均衡。(4小时)
4掌握在x86体系结构上系统调用的具体实现原理,接口参数传递,用户地址空间和核心地址空间之间的数据传输,和增加新的系统功能的方法。(2小时)
5熟悉在x86体系结构上Linux中断和异常的处理原理,中断注册、共享、控制,和中断上下文的意义,中断和设备驱动程序的关系,以及设备驱动程序结构和用户接口。(4小时)
6中断处理程序被分解为top half和bottom half的原因,介绍linux的softirq,tasklet,ksoftirqd和work queue,分析进程与top half,bottom half的竞争情形和同步。(4小时)
7掌握内核同步原理和方法:原子操作,自旋锁,(读—写)信号量,完成变量,bkl,seqlock和延迟内核抢占。了解指令“路障”。(4小时)
8介绍系统时钟和硬件定时器,单处理器和多处理器上的linux计时体系结构,定时的时间插补原理,单处理器和多处理器上的时钟中断处理,动态定时器的数据结构和算法原理,定时器竞争情形,延迟函数。Time,gettimeofday,adjtimex,setitimer,alarm的实现原理和应用。(4小时)
9熟悉进程地址空间的区和页,分配和释放物理页,物理地址与逻辑地址、虚地址之间的映射,slub分配原理和方法,高端物理内存的映射。(4小时)
10介绍VFS原理,超级块,inode结构和方法,dentry结构和方法,file结构和方法,以及进程打开文件表,linux中的文件系统。(2小时)
11讲解块设备缓冲,bio结构,I/O请求队列,和有最终期限的块I/O调度算法。(2小时)
12熟悉进程地址空间的分区,mm_struct结构,vm_area_struct结构和操作,,进程的页表文件映射接口mmap原理和方法。(2小时)
13熟悉页cache和radix_tree,缓冲区cache,和pdflush内核线程原理。(2小时)
C++语言程序设计第四版(郑莉)答案
分为两部分
第1部分:习题解答
第2部分:实验指导
linux环境高级编程课件_uestc
电子科技大学的linux环境高级编程课程课件
STC51单片机示范程序
开发板自带的51单片机程序,有LCD,音乐播放,12864,定时器,温度采集......