forked from LearningOS/os-lectures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslide-16-06.tex
306 lines (235 loc) · 8.29 KB
/
slide-16-06.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
\input{../preamble}
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
\title[第16讲]{第十六讲 :进程通信} % The short title appears at the bottom of every slide, the full title is only on the title page
\subtitle{第6节:Binder机制}
\author{向勇、陈渝、李国良} % Your name
\institute[清华大学] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{
清华大学计算机系 \\ % Your institution for the title page
\medskip
\textit{xyong,yuchen,[email protected]} % Your email address
}
\date{\today} % Date, can be changed to a custom date
\begin{document}
\begin{frame}
\titlepage % Print the title page as the first slide
\end{frame}
%----------------------------------------------
%\begin{frame}
%\frametitle{提纲} % Table of contents slide, comment this block out to remove it
%\tableofcontents % Throughout your presentation, if you choose to use \section{} and \subsection{} commands, these will automatically be printed on this slide as an overview of your presentation
%
%\end{frame}
%----------------------------------------------
%% PRESENTATION SLIDES
%----------------------------------------------
\section{第6节:Binder机制} % Sections can be created in order to organize your presentation into discrete blocks, all sections and subsections are automatically printed in the table of contents as an overview of the talk
%----------------------------------------------
\subsection{Binder介绍} % A subsection can be created just before a set of slides with a common theme to further break down your presentation into chunks
%----------------------------------------------
\begin{frame}[plain]
\frametitle{背景介绍}
\centering
\includegraphics[width=.2\textwidth]{bos}
\includegraphics[width=.1\textwidth]{palmos}
\includegraphics[width=.4\textwidth]{android-history}
\includegraphics[width=.8\textwidth]{binder-history}
\end{frame}
%----------------------------------------------
\begin{frame}[plain]
\frametitle{背景介绍}
\centering
\includegraphics[width=.7\textwidth]{android-arch}
\end{frame}
%----------------------------------------------
\begin{frame}[fragile]
\frametitle{背景介绍}
% \framesubtitle{xxxx}
\begin{columns}
\begin{column}{.4\textwidth}
\includegraphics[width=1.\textwidth]{android-arch}
\end{column}
\begin{column}{.6\textwidth}
Linux kernel v.s. Android
\begin{itemize}
\item binder -- 新的IPC机制
\item ashmem -- 新的shared memory机制
\item logger
\item ......
\end{itemize}
\begin{block}{Binder: Android's Solution}
“In the Android platform, the binder is used for
nearly everything that happens across processes
in the core platform. " – Dianne Hackborn
https://lkml.org/lkml/2009/6/25/3
\end{block}
\end{column}
\end{columns}
\end{frame}
%----------------------------------------------
\begin{frame}[fragile]
\frametitle{背景介绍}
% \framesubtitle{xxxx}
\begin{columns}
\begin{column}{.4\textwidth}
\includegraphics[width=1.\textwidth]{android-arch}
\end{column}
\begin{column}{.6\textwidth}
Android进程
\includegraphics[width=1.\textwidth]{android-fork}
\end{column}
\end{columns}
\end{frame}
%----------------------------------------------
\begin{frame}[fragile]
\frametitle{背景介绍}
% \framesubtitle{xxxx}
\begin{columns}
\begin{column}{.5\textwidth}
Android进程
\includegraphics[width=1.\textwidth]{android-fork}
\end{column}
\begin{column}{.5\textwidth}
Android任务 task
\includegraphics[width=1.\textwidth]{android-task}
\end{column}
\end{columns}
\end{frame}
%----------------------------------------------
\begin{frame}[fragile]
\frametitle{背景介绍}
% \framesubtitle{xxxx}
\begin{columns}
\begin{column}{.5\textwidth}
Android任务task
\includegraphics[width=1.\textwidth]{android-task}
\end{column}
\begin{column}{.5\textwidth}
Android任务如何跨进程交互?
\includegraphics[width=1.\textwidth]{android-how-ipc}
\end{column}
\end{columns}
\end{frame}
%----------------------------------------------
\begin{frame}[fragile]
\frametitle{Binder机制}
\begin{columns}
\begin{column}{.5\textwidth}
Android任务如何跨进程交互?
\includegraphics[width=1.\textwidth]{android-how-ipc}
\end{column}
\begin{column}{.5\textwidth}
\includegraphics[width=1.\textwidth]{binder-simple1}
\end{column}
\end{columns}
\end{frame}
%----------------------------------------------
\begin{frame}[fragile]
\frametitle{Binder机制}
% \framesubtitle{xxxx}
\begin{columns}
\begin{column}{.5\textwidth}
Android任务如何跨进程交互?
\includegraphics[width=1.\textwidth]{android-how-ipc}
\end{column}
\begin{column}{.5\textwidth}
\includegraphics[width=1.\textwidth]{binder-simple2}
\end{column}
\end{columns}
\end{frame}
%----------------------------------------------
\begin{frame}[fragile]
\frametitle{Binder机制}
% \framesubtitle{xxxx}
\begin{columns}
\begin{column}{.5\textwidth}
Android任务如何跨进程交互?
\includegraphics[width=1.\textwidth]{android-how-ipc}
\end{column}
\begin{column}{.5\textwidth}
\includegraphics[width=1.\textwidth]{binder-idl}
\end{column}
\end{columns}
\end{frame}
%----------------------------------------------
\begin{frame}[fragile]
\frametitle{Binder机制}
% \framesubtitle{xxxx}
\begin{columns}
\begin{column}{.5\textwidth}
% Android任务如何跨进程交互?
\includegraphics[width=1.\textwidth]{binder-layer}
\end{column}
\begin{column}{.5\textwidth}
\includegraphics[width=.5\textwidth]{binder-abstract}
\begin{itemize}
\item Intent -- 最高层的IPC抽象
\item AIDL -- Android Interface Definition Language
\item binder: kernel driver
\item ashmem: shared memory
\end{itemize}
\end{column}
\end{columns}
\end{frame}
%----------------------------------------------
\begin{frame}[plain]
\frametitle{Binder机制}
\centering
\includegraphics[width=.8\textwidth]{binder-call}
\end{frame}
\begin{frame}[plain]
\frametitle{Binder机制}
% \centering
% \includegraphics[width=1.\textwidth]{binder-infoflow}
\begin{columns}
\begin{column}{.6\textwidth}
\includegraphics[width=1.\textwidth]{binder-infoflow}
\end{column}
\begin{column}{.4\textwidth}
\includegraphics[width=1.\textwidth]{binder-buf}
% \begin{itemize}
% \item Intent -- 最高层的IPC抽象
% \item AIDL -- Android Interface Definition Language
% \item binder: kernel driver
% \item ashmem: shared memory
% \end{itemize}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[plain]
\frametitle{Binder机制}
\centering
\includegraphics[width=1.\textwidth]{binder-ctr-layers}
\end{frame}
\begin{frame}[plain]
\frametitle{Binder机制}
\centering
\includegraphics[width=.6\textwidth]{binder-ex1}
\includegraphics[width=.6\textwidth]{binder-ex3}
\end{frame}
%----------------------------------------------
\begin{frame}[plain]
\frametitle{Binder机制 }
\includegraphics[width=.9\textwidth]{binder-arch-sm}
\end{frame}
%-------------------------
%----------------------------------------------
\begin{frame}[plain]
\frametitle{Binder机制 -- 一次拷贝}
\includegraphics[width=1.\textwidth]{binder-one-copy}
\end{frame}
%----------------------------------------------
\begin{frame}[plain]
\frametitle{参考}
\begin{itemize}
\item \href{http://www.dre.vanderbilt.edu/~schmidt/cs282/PDFs/android-binder-ipc.pdf}{Android IPC Mechanism}, Jim Huang (黄敬群), 2012
\item \href{https://www.cs.jhu.edu/~huang/cs318/fall18/lectures/lec20_mobile_ds.pdf}{Lec20}: CS 318 Principles of Operating Systems, Ryan Huang, 2020
\item \href{https://events.static.linuxfound.org/images/stories/slides/abs2013_gargentas.pdf}{Deep Dive into Android IPC/Binder Framework at Android Builders Summit}, Aleksandar Gargenta, 2013
\item \href{http://gityuan.com/2016/09/04/binder-start-service/}{彻底理解Android Binder通信架构}, Gityuan, 2016
\end{itemize}
\end{frame}
%----------------------------------------------
%----------------------------------------------
\end{document}