Qualcomm Interview Question
Country: India
Interview Type: In-Person
Binder is an Android-specific interprocess communication mechanism, and remote method invocation system.
Each app runs in a different process, although that process may be single threaded or multi-threaded.
One app crashing never touches any other app. No binder needed here.
Just as in normal (non-Android) Linux: one process dying cannot take another unrelated process down, let alone the whole system, since all processes run separate copies of code.
That is, one Android process can call a routine in another Android process, using binder to indentify the method to invoke and pass the arguments between processes.
note that Android does NOT use SysV IPC for interprocess communication
the binder implementation is in the kernel source at: drivers/misc/binder.c, with include file: include/linux/binder.h
Android binder is the IPC which communicates between processes using a small custom kernel module.
- tranquil November 25, 2012Although android is coded in java, a separate IPC is needed because android runs on the dalvic OS which in linux acts as a single thread. Hence if the vm crashes, this will result in closing of all the apps. Android binder prevents this from happening.