the difference between a process and a threadaLineprocess canChongBuild and WithdrawPinanotherLineProcess;with oneintomultiple in the processLineThreadsRoomcan andHairLine. A program has at least one in Span lang= "ZH-CN" style= "Background-color:inherit" "Thread one Enter line The process has a separate memory single element in the process. and multiple threads share memory, which greatly improves the running efficiency of the program. in thePracticeLineeverprocess,everya separateLineProcess has a program to run the entrance,ShunOrderPracticethe line sequence and the exit of the program. ButLineProcess cannotenoughIndependentPracticeYes, mustshall bedependent onshould bein the program, theshould beUse the program to provide multipleLineProcessPracticeLine control. fromLogicpoint of view, manyLineCheng's meaningrighteousnesslies in ashould bein the program, there are multiplePracticeThe line part can be the sameTimeline. But the operating systemIntegrationdoes not add multipleLinethe process is seen as multiple independentshould beuse, Comeimplement intoprocess ofTunedegree and management as well asCapitalThe source assignment. itis thatintoProcess andLineimportant areas of the processDon't.
How Android declares a processin the manifest
<activity>
,
<service>
,
<receiver>
, and
<provider>
-There is one parameter:
android:process
, you can indicate which process the current component is running in. Reference: Http://developer.android.com/guide/components/processes-and-threads.html
the impact of processes on applicationThere are several processes in a project, the default application will start several times, that is, OnCreate will be called multiple times. Reference: http://hubingforever.blog.163.com/blog/static/17104057920126285951877/http://blog.csdn.net/baodinglaolang/article/details/9903499
inter-process communication scenariosActivity, ContentProvider, broadcast and AidlReference: Http://www.2cto.com/kf/201202/119100.html
Android Multi-Process summary