1 / 53

1 /53

2 3 - Oct (Fri) , 2009. Zygote Anatomy Based on Prelink & Preload for Android Platform. 4th Korea Android Seminar. GeunSik Lim leemgs@gmail.com http://blog.naver.com/invain. 1 /53. Agenda. Dynamic Linking & Static Linking Prelink Fund a m e nt a ls Understanding Preload

marged
Download Presentation

1 /53

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 23-Oct(Fri) , 2009 Zygote Anatomy Based on Prelink & Preload for Android Platform 4thKorea Android Seminar • GeunSik Lim • leemgs@gmail.com • http://blog.naver.com/invain 1/53 4th Korea Android Seminar

  2. 4th Korea Android Seminar Agenda Dynamic Linking & Static Linking Prelink Fundamentals Understanding Preload Custom Linker (=Android Prelink) Zygote Walkthrough Relation between process and thread by Zygote 2/53

  3. 4th Korea Android Seminar Main Keywords in This Session Dynamic Linking Prefetch Static Linking Prelink Custom Linker for Android Preread Zygote Preload Dynamic Loading Prefork 3/53

  4. 4th Korea Android Seminar Location of Linkerin FOSS World 4/53

  5. 4th Korea Android Seminar Static Linking • Static linking avoids dependency problems. (-static) • In general cases, static linking can result in a performance improvement. • Static linking can also allow the application to be contained in a single executable file, simplifying distribution and installation. • In static linking, the size of the executable becomes greater than in dynamic linking, as the library code is stored within the executable rather than in separate files. 5/53

  6. 4th Korea Android Seminar Dynamic Linking • Libraries can be integrated into a program once by a linker. Dynamic linking has advantages in code size and management. ( -dynamic) • But, every time a program is run, the loader needs to find the relevant libraries. • Because 1) the libraries can move around in memory, this causes a performance penalty, 2) and the more libraries that need to be resolved, the greater the penalty. 6/53

  7. 4th Korea Android Seminar Dynamic loading with Linux • Programming Interface : dlopen( ), dlsym( ), dlclose( ), dlerror( ) • Load the math library, and print the cosine of 2.0 #include stdio.h , stdlib.h , dlfcn.h int main (int argc, char **argv) { void *handle; double (*cosine)(double); char *error; handle = dlopen("libm.so", RTLD_LAZY); if (!handle) { fprintf(stderr, "%s\n", dlerror()); exit(EXIT_FAILURE); } dlerror(); /* Clear any existing error */ *(void **) (&cosine) = dlsym(handle, "cos"); if ((error = dlerror()) != NULL) { fprintf(stderr, "%s\n", error); exit(EXIT_FAILURE); } printf(“Consine is %f\n", (*cosine)(2.0)); dlclose(handle); exit(EXIT_SUCCESS); } 7/53

  8. 4th Korea Android Seminar Program Y Program X Static libraries( *.a ) Static libraries( *.a ) Static vs. dynamic Static Linux libraries Dynamic Loading Shared Dynamic Linking Static linking Static linking At compile-time (init daemon of Android) Program X Program Y Dynamic linking Shared libraries( *.so ) Dynamic linking Of shared libraries At run-time 8/53

  9. 4th Korea Android Seminar cpp0 PreProcesser cc1 C Compiler ld or collect2 Linker Assembler Hello.c C Source Hello.i ProProcess Result Hello.s Assembly File Hello.o Object File Hello ELF --save-temps Source Compile Process ADT JAVA Compiler DX Utility with .XML & .ARSC Eclipse .java (Source Code) .class file(Byte Code) .dex like exeon Dalvik VM(Interpreter) .apk Decompiler(e.g: Decafe , DJ Java) 9/53

  10. 4th Korea Android Seminar Preload • Files of more frequently-used programs are, during a computer's spare time, loaded into memory. • This results in faster (speed up) application startup times as less data needs to be fetched from disk. /lib/libc.so.6 /lib/libcom_err.so.2 /lib/libcrypt.so.1 /lib/libcrypto.so.6 /lib/libdb-4.3.so /lib/libdbus-1.so.3 /lib/libdl.so.2 /lib/libexpat.so.0 /lib/libglib-2.0.so.0 /lib/libgmodule-2.0.so.0 /lib/libgobject-2.0.so.0 /lib/libgthread-2.0.so.0 . . . Below Omission . . . Preload frequently-used programs 10/53

  11. 4th Korea Android Seminar Readahead Daemon for Preload • The readahead reads the contents of a list of files into memory, which causes them to be read from cache when they are actually needed. Its goal is to speed up the boot process. • e.g) Readahead daemon for Linux distribution - An adaptive prefetching daemon - http://sourceforge.net/projects/preload/ #> /usr/sbin/readahead `cat /etc/readahead.early.files` & - A list of files cached in the memory lsof / | grep -v "^\(lsof\|grep\)" | awk '{ print $4 " " $9 }' | grep ^mem \ | awk '{ print $2 }' |grep -v "^.\(var\|tmp\|home\|root\)" | grep ^[/] | sort -u if (fd >= 0) { readahead(fd, offset, length); close (fd); } 11/53

  12. 4th Korea Android Seminar What is Prelink? • A tool designed to speed up dynamic linking of ELF programs. (e.g:ELF shared libraries and ELF dynamically linked binaries) • To speed up a system by reducing the time a program needs to begin. • A FOSS is written by Jakub Jelinek of Red Hat. • F11#> svn checkout http://sourceware.org/svn/prelink/trunk prelink • Process on Mac OS X is called "prebinding". 12/53

  13. 4th Korea Android Seminar Merits of Prelink • Dynamic linker needs for their relocation at startup significantly decreases. • The run-time memory consumption decreases too according to fewer relocations. ☎ Prelinked system fedora11$> LD_DEBUG=statistics firefox 2>&1 | sed ’s/ˆ *//’ 25733: runtime linker statistics: 25733: total startup time in dynamic loader: 5533696 clock cycles 25733: time needed for relocation: 1941529 clock cycles (35.0%) 25733: number of relocations: 0 25733: number of relocations from cache: 2066 25733: number of relative relocations: 0 25733: time needed to load objects: 3217736 clock cycles (58.1%) 25733: runtime linker statistics: 25733: final number of relocations: 0 25733: final number of relocations from cache: 2066 13/53

  14. 4th Korea Android Seminar Prelink Map Global OffsetTable Process Linkage Table Dynamic Loader Application call func_a(); ... ... call func_b(); ... ... call func_c(); ... ... call func_d(); ... ... dl_runtime_resolve { . . . . . . } ④ ③ ② ① Symbol Table Lazy Binding func_a ... ... func_b ... func_c ... ⑦ 0x12345678 Symbol Lookup ⑧ ⑤ Update GOT (Relocation) LookUp Address ⑥ Absolute Address of Symbole 14/53

  15. 4th Korea Android Seminar Prelink on X86 Desktop 1/2 prelink-no#> yum -y install prelink ( ubuntu#> apt-get –y install prelink ) prelink-no#> prelink ./firefox prelink-yes#> time LD_DEBUG=statistics DISPLAY= LD_LIBRARY_PATH=. ./firefox real 7m0.261s user 4m0.026s sys 1m0.082s prelink-yes#> prelink --undo ./firefox prelink-no#> time LD_DEBUG=statistics DISPLAY= LD_LIBRARY_PATH=. ./firefox real 9m1.342s user 5m6.024s sys 1m5.052s Speed Up 15/53

  16. 4th Korea Android Seminar Prelink on X86 Desktop 2/2 • Appended Section Headers After Prelink : .gnu_liblist , .gnu_conflict, .gnu_prelink_undo 16/53

  17. 4th Korea Android Seminar Why do you need Prelink? • prelink reduces this penalty by using the system's dynamic linker to reversibly perform this linking in advance by relocating. • Afterward, the program only needs to spend time finding the relevant libraries on being run if, for some reason (perhaps an upgrade), the libraries have changed since being prelinked. • In Android Platform, The need for Almost all the local symbols ( 80-90 % of the symbols in .rel.dyn and .rel.plt) and it gives much quicker performance. In Summary, In order to reduce size and speed up loading. 17/53

  18. F11#> export LANG=C F11#> man 2 dlopen F11#> man 3 exec 4th Korea Android Seminar Diff Between Prelink and Preload in Mobile • Prelink for prelinked binary execution model for fork and exec model. • Preload for non-prelinked binary execution model for fork and dlopen model. • Hybrid for pre-linked binary execution model for fork and dlopen model. Zygote For Mobile Ref) Hybrid related Paper : Performance Characterization of Prelinking and Preloading for Embedded Systems 18/53

  19. 4th Korea Android Seminar Memory Layout of Pre-linked Libraries Prelinked libraries can only be loaded at the very specific virtual memory address they have been prelinked to (during the build process). The list of prelinked system libraries and their corresponding virtual memory address is found in the below file. • #define PRELINK_MIN 0x90000000 • #define PRELINK_MAX 0xB0000000 ./build/core/prelink-linux-arm.map # 0xC0000000 - 0xFFFFFFFF Kernel # 0xB0100000 - 0xBFFFFFFF Thread 0 Stack # 0xB0000000 - 0xB00FFFFF Linker # 0xA0000000 - 0xBFFFFFFF Prelinked System Libraries # 0x90000000 - 0x9FFFFFFF Prelinked App Libraries # 0x80000000 - 0x8FFFFFFF Non-prelinked Libraries # 0x40000000 - 0x7FFFFFFF mmap'd stuff # 0x10000000 - 0x3FFFFFFF Thread Stacks # 0x00000000 - 0x0FFFFFFF .text / .data / heap 19/53

  20. 4th Korea Android Seminar Prelinked System Libraries 01. Core System Libraries (libdl, libc, libstdc++, libm, liblog, libcutils, libthread_db, libz, libevent, libssl, libcrypto, libsysutils) 02. Bluetooth (liba2dp, audio, input, libhcid, libbluedroid, libbluetooth, libdbus) 03. Extended system libraries ( libril, libreference-ril, libwpa_client, libnetutils) 04. Core dalvik runtime support (libicuuc, libicui18n, libandroid-runtime, libnativehelper, libdvm-ARM, libdvm) 05. Graphics ( libpixelflinger, libcorecg, libsurfaceflinger, libagl, libGLESv1_CM, libGLESv2, libOpenVG_CM, libOpenVGU_CM, libEGL, libexif, libui, libsgl) 06. Audio 07. Assorted System libraries 08. PV opencore libraries 09. Opencore hardware support 10. PV libraries 20/53

  21. 4th Korea Android Seminar Prelinked Application Libraries 01. libraries for specific apps or temporary ( libcam_ipl, libwbxml, libwbxml_jni, libxml2wbxml, libaes, libdrm1, libdrm1_jni, libwapcore, libstreetview, libwapbrowsertest, libminiglobe, libearth, libembunit, libneon, and so on) 21/53

  22. 4th Korea Android Seminar How to use Prelink Module for Android 1/2 • It should be updated each time that a new system library is added to the system. • The prelink step happens at build time, and uses the 'soslim' and 'apriori‘ tools: • 'soslim(./build/tools/soslim/*)' is used to find symbols in an executable ELF file and generate a list that can be passed to 'apriori'. • 'apriori(./build/tools/apriori/*)' is the real prelink tool which removes relocations from the shared object, however, it must be given a list of symbols to remove from the file. 22/53

  23. 4th Korea Android Seminar Difference between Prelink and Android Prelink? • Android Prelink is a custom pre-linking tool. • The same thing than GNU-style hash with minor modifications. (e.g. forcing power-of-2 table sizes to avoid the horribly slow module operation on ARM during lookups, plus selecting smaller table sizes by default.  Q: GNU LD 2.17.50.0.X has the support of GNU-style hash. What is the benefit of this approach??? • Custom pre-linking tool means that remove the need for most of the symbol lookups. /* NetBSD's Hash Table */ int hash_lookup(Elf *elf, Elf_Data *hash, Elf_Data *symtab, Elf_Data *symstr, const char *symname) { Elf32_Word *hash_data = (Elf32_Word *)hash->d_buf; Elf32_Word index; Elf32_Word nbuckets = *hash_data++; Elf32_Word *buckets = ++hash_data; Elf32_Word *chains = hash_data + nbuckets; index = buckets[elf_hash(symname) % nbuckets]; while (index != STN_UNDEF && strcmp((char *)symstr->d_buf +((Elf32_Sym *)symtab->d_buf)[index].st_name, symname)) { index = chains[index]; } return index; } 23/53

  24. 4th Korea Android Seminar How to use Prelink Module for Android 2/2 • By default, these tools are only used to remove internal symbols from libraries, though they have been designed to allow more aggressive optimizations . (e.g. 'global' prelinking and symbol stripping, which prevent replacing individual system libraries though). • You can disable prelinking at build time by modifying your Android.mk with a line like: LOCAL_PRELINK_MODULE := false (e.g. ./bionic/libc/Android.mk , ./bionic/linker/Android.mk, and so on ) 24/53

  25. 4th Korea Android Seminar Prelink Module for shared libraries • Standard rules for building a normal shared library. • Additional inputs from base_rules.make: None. • LOCAL_PRELINK_MODULE will be set for you. • AndroidPrelink tool means Android Toolchain and Bionic libc Optimization of dynamic libraries : Prelink (pre-connected) technology ./build/core/shared_library.mk 25/53

  26. 4th Korea Android Seminar What is Zygote ? • The "zygote" is a preforked simple process that the system keeps around that makes new application startup faster. •  By Dan Morrill <morrildl@google.com> • It sits idle in a neutral state(that is, "unfertilized" by a specific • application)until it's needed, at which point the system instructs it to exec() the appropriate application. A new zygote process is then started up in the background to replace the old, waiting for the next process to start. 26/53

  27. 4th Korea Android Seminar What is Zygote’s Role? • Zygote start Dalvik VM and start system server. It’s the most important process to speed up.The source is in ./device/servers/app. • You absolutely can not create any threads in zygote, since it will be forking (without exec) from itself.  By Dianne Hackborn • $> chrome “--renderer-cmd-prefix=gdb –args” Using the --renderer-cmd-prefix option bypasses the zygote launcher. 27/53

  28. 4th Korea Android Seminar Zygote Anatomy for Android Platform Fork new VM (Dalvik)‏ libc By init (static) Runtime Zygote Zygote Prelinked Libstdc++ Prelinked libc Surface Flinger Activie Manager Package Manager WindowManager . . . Audio Flinger System Server Dalvik Dalvik System Server System Server 28/53

  29. 4th Korea Android Seminar Zygote’s location in boot sequence • System Server starts the core Android services. e.g) ActivityManager, WindowManager, PackageManager, etc init Linux daemons Zygote Runtime Service Manager dalvik Core Engine System Server Registration (binder) Surface Manager Audio Manager Core Services Telephony BlueTooth . . . . . . Active Manager Package Manager Service Manager 29/53

  30. 4th Korea Android Seminar Start-up Walkthrough It all starts with init… Similar to most Linux-based systems at startup, the bootloader loads the Linux kernel and starts the init process. Init Linux Kernel 30/53

  31. 4th Korea Android Seminar Init starts Linux daemons, including: Start-up Walkthrough • USB Daemon to manage USB connections • Android Debug Bridge to manage ADB connections • Debugger Daemon to manage debug processes requests (dump memory, etc.) • Radio Interface Layer Daemon to manage communication with the radio. usbd adbd debuggerd rild init 31/53

  32. 4th Korea Android Seminar Start-up Walkthrough Init process starts the zygote process: • A nascent process which initializes a Dalvik VM instance. Loads classes and listens on socket for requests to spawn VMs. (Load preload classes: device/java/android/preloaded-classes) • Forks on request to create VM instances for managed processes. (Load preload resources.) • Copy-on-write to maximize re-use and minimize footprint. usbd adbd debuggerd Zygote daemons Init device/java/android/com/android/internal/os/ZygoteInit.java 32/53

  33. 4th Korea Android Seminar Start-up Walkthrough • Pre-loaded Class objects do live in the Zygote heap. • Classes(1,167) which are preloaded by com.android.internal.os.ZygoteInit. • Screenshot using LogCat ( e.g: Log.d , Log.e , Log.i , Log.v , Log.w ) 07-13 19:52:44.667: INFO/Zygote(563): ...preloaded 15 resources in 23ms. 07-13 19:52:44.727: DEBUG/dalvikvm(563): GC freed 117 objects / 8416 bytes in 52ms 07-13 19:52:44.786: DEBUG/dalvikvm(563): GC freed 205 objects / 8064 bytes in 47ms 07-13 19:52:44.852: DEBUG/dalvikvm(563): GC freed 36 objects / 1384 bytes in 50ms 07-13 19:52:44.846: INFO/dalvikvm(563): Splitting out new zygote heap 07-13 19:52:44.876: INFO/dalvikvm(563): System server process 582 has been created 07-13 19:52:44.876: INFO/Zygote(563): Accepting command socket connections 07-13 19:52:44.917: INFO/jdwp(582): received file descriptor 19 from ADB 07-13 19:52:45.016: DEBUG/dalvikvm(582): Trying to load lib /system/lib/libandroid_servers.so 0x0 07-13 19:52:45.186: DEBUG/dalvikvm(582): Added shared lib /system/lib/libandroid_servers.so 0x0 07-13 19:52:45.206: INFO/sysproc(582): Entered system_init() 07-13 19:52:45.206: INFO/sysproc(582): ServiceManager: 0x16c838 07-13 19:52:45.206: INFO/SurfaceFlinger(582): SurfaceFlinger is starting 07-13 19:52:45.218: INFO/SurfaceFlinger(582): SurfaceFlinger's main thread ready to run. Initializing graphics... Preloading Classes (Resources) Preload is often paired with prelink. 33/53

  34. 4th Korea Android Seminar Start-up Walkthrough Zygote Public Class for Developers http://developer.android.com/reference/dalvik/system/Zygote.html 34/53

  35. 4th Korea Android Seminar Init starts runtime process: Start-up Walkthrough • Initializes Service Manager – the context manager for Binder that handles service registration and lookup. • Registers Service Manager as default context manager for Binder services. Service Manager usbd adbd debuggerd runtime Zygote daemons Init 35/53

  36. 4th Korea Android Seminar Start-up Walkthrough Runtime process sends request for Zygote to start System Service. Service Manager usbd adbd debuggerd runtime Zygote daemons Init 36/53

  37. 4th Korea Android Seminar Start-up Walkthrough • Runtime process sends request for Zygote to start System Server.  frameworks/base/services/java/com/android/server/SystemServer.java . runtime->callStatic("com/android/server/SystemServer", "init2"); 2. Zygote forks a new VM instance for the System Service process and starts the service.  Zygote::forkSystemServer (in device/dalvik/vm/InternalNative.c).  com.android.server.SystemServer(in device/java/services/com/android/server).  system_init ( in device/servers/system/library/system_init.cpp). Service System Manager Server usbd adbd debuggerd runtime Zygote Dalvik VM daemons Init 37/53

  38. 4th Korea Android Seminar Start-up Walkthrough Zygote for Custom Prelink in Android service servicemanager /system/bin/servicemanager user system critical onrestart restart zygote onrestart restart media service zygote/system/bin/app_process -Xzygote /system/bin --zygote --start-system-server socket zygote stream 666 onrestart write /sys/android_power/request_state wake onrestart write /sys/power/state on ./frameworks/base/cmds/app_process/app_main.cpp 38/53

  39. 4th Korea Android Seminar Start-up Walkthrough System Service starts the native system servers, including: • Surface Flinger. • Audio Flinger. Audio Flinger Surface Flinger Service System Manager Server usbd adbd debuggerd runtime Zygote Dalvik VM daemons Init

  40. 4th Korea Android Seminar Start-up Walkthrough Native system servers register with Service Manager as IPC service targets:  IPCThreadState::self()->joinThreadPool() Audio Flinger Surface Flinger Service System Manager Server usbd adbd debuggerd runtime Zygote Dalvik VM daemons Init 40/53

  41. 4th Korea Android Seminar Start-up Walkthrough System Service starts the Android managed services: Location Content Telephony Bluetooth Connectivity Manager Manager Service Service Service Activity Power Window Package … Manager Manager Manager Manager Camera Service Surface Flinger Service System Manager Server usbd adbd debuggerd runtime Zygote Dalvik VM daemons Init 41/53

  42. 4th Korea Android Seminar Start-up Walkthrough Android managed Services register with Service Manager: Location Content Telephony Bluetooth Connectivity Manager Manager Service Service Service Activity Power Window Package … Manager Manager Manager Manager Service Camera Manager Service Surface Flinger Service System Manager Server usbd adbd debuggerd runtime Zygote Dalvik VM daemons Init 42/53

  43. 4th Korea Android Seminar Communications Between zygote and Java app Zygote System Server (Core Engine) Runtime init AndroidRuntime zygoteinit Application Content Application Application Thread Fork Fork Dalvik ActivityThread Instrumentation socket WindowManager ActivityManager Packagemanager Fork Binder IPC Java Process (Core Services , e.g: android.process.acore) Application Content Application Application Thread ☞Other JAVA process is created from ActivityManagerService (run in system_server process) like this. int pid = Process.start("android.app.ActivityThread", mSimpleProcessManagement ? app.processName : null, uid, uid, gids, ((app.info.flags&ApplicationInfo.FLAG_DEBUGGABLE) != 0), null); ActivityThread Instrumentation WindowManager ActivityManager Packagemanager 43/53

  44. 4th Korea Android Seminar Start-up Walkthrough Power Manager … Activity Manager Camera Service Surface Flinger Service System Manager Server usbd adbd debuggerd runtime Zygote Dalvik VM daemons Init

  45. 4th Korea Android Seminar Start-up Walkthrough After system server loads all services, the system is ready… System Init Daemon runtime Zygote Server Processes Activity Manager Package Manager Window Manager … Dalvik VM Surface usbd Flinger adbd debuggerd Audio Init runtime Zygote daemons Flinger 45/53

  46. 4th Korea Android Seminar Start-up Walkthrough After system server loads all services, the system is ready… Init Home Daemon System runtime Zygote Server Processes Home Activity Manager Dalvik VM Package Manager Window Manager … Dalvik VM Surface usbd Flinger debuggerd adbd Audio Init runtime Zygote Flinger daemons 46/53

  47. 4th Korea Android Seminar Start-up Walkthrough After system server loads all services, the system is ready… System Home Server Daemon Zygote runtime Init Processes Activity Home Manager Package Dalvik VM Manager Window Manager … Dalvik VM Surface usbd Flinger adbd debuggerd Audio daemons Zygote Init runtime Flinger libc libc libc libc libc libc 47/53

  48. 4th Korea Android Seminar Start-up Walkthrough Each subsequent application is launched in it's own process runtime System Daemon Zygote Contacts Home Server Processes Activity Home Contacts Manager Package Dalvik VM Dalvik VM Manager Window Manager … Dalvik VM Surface usbd Flinger adbd Audio debuggerd runtime Zygote Flinger daemons libc libc libc libc libc libc 48/53

  49. 4th Korea Android Seminar Relations between PID and TID by zygote USER PID PPID VSIZE RSS WCHAN PC NAME root 1 0 252 164 c0082240 0000ab0c S /init root 536 1 740 312 c0141bb0 afe0c1bc S /system/bin/sh system 537 1 808 264 c01654b4 afe0c45c S /system/bin/servicemanager root 539 1 668 264 c0192c20 afe0cdec S /system/bin/debuggerd radio 540 1 5392 684 ffffffff afe0cacc S /system/bin/rild root 541 1 72432 25176 c008e3f4 afe0c584 S zygote media 542 1 17720 3528 ffffffff afe0c45c S /system/bin/mediaserver root 543 1 800 324 c01f3b04 afe0c1bc S /system/bin/installd root 549 1 3332 152 ffffffff 0000e8c4 S /sbin/adbd system 572 541 181016 24620 ffffffff afe0c45c S system_server radio 657 541 105856 17724 ffffffff afe0d3e4 S com.android.phone app_2 673 541 115412 21328 ffffffff afe0d3e4 S android.process.acore app_15 687 541 94492 13364 ffffffff afe0d3e4 S com.android.mms app_0 703 541 94296 12656 ffffffff afe0d3e4 S com.android.alarmclock app_3 709 541 98380 12968 ffffffff afe0d3e4 S com.android.inputmethod.latin app_4 721 541 95416 13620 ffffffff afe0d3e4 S android.process.media system 723 541 98332 12536 ffffffff afe0d3e4 S com.android.settings Parent PID (Forked Process) 49/53

  50. 4th Korea Android Seminar Relations between PID and TID by zygote /proc/1 init 572 system_server 573 HeapWorker 574 Signal Catcher 575 JDWP 576 Binder Thread # 577 Binder Thread # 578 Binder Thread # 579 SurfaceFlinger 587 DisplayEventThr 588 er.ServerThread 590 ActivityManager 591 ProcessStats 592 PackageManager 604 FileObserver 642 SyncHandlerThread 643 UEventObserver 644 PowerManagerServer 645 AlarmManager 646 WindowManager 647 InputDeviceRead 652 WindowManagerPo 649 InputDispatcher 650 ConnectivityThread 651 WifiService 652 WIfiWatchdogThread 653 AudioService 654 android:unnamed 655 android:unnamed 656 er$SensorThread 661 watchdog 671 app_process 672 GPSEventThread 693 Binder Thread# 694 Binder Thread# 711 r.MountListener 738 Binder Thread# 739 Binder Thread# Dalvik System(Native Start) Exec /proc/531 zygote Fork /proc/572 System Server Create threads /proc/572/task/ 37 threads 50/53

More Related