All Projects → hungys → binder-for-linux

hungys / binder-for-linux

Licence: other
An experimental project to port Android Binder IPC subsystem to Ubuntu Linux.

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
assembly
5116 projects

Projects that are alternatives of or similar to binder-for-linux

libgbinder
GLib-style interface to binder
Stars: ✭ 21 (-80.91%)
Mutual labels:  binder, ipc
Easymessenger
一款Android平台上基于Binder的IPC进程间通信库
Stars: ✭ 24 (-78.18%)
Mutual labels:  binder, ipc
Flying Pigeon
flying-pigeon 是一个IPC 跨进程通信组件,底层是匿名内存+Binder , 突破1MB大小限制,无需写AIDL文件,让实现跨进程通信就像写一个接口一样简单
Stars: ✭ 97 (-11.82%)
Mutual labels:  binder, ipc
IpcEventBus
Faster than Intents and easier than AIDLs.
Stars: ✭ 35 (-68.18%)
Mutual labels:  ipc
SPMC Queue
A simple and efficient single producer multiple consumer queue, suititable for both ITC and IPC.
Stars: ✭ 19 (-82.73%)
Mutual labels:  ipc
csgo richpresence
Discord Rich Presence support for Counter-Strike: Global Offensive!
Stars: ✭ 16 (-85.45%)
Mutual labels:  ipc
fastmq
High performance message broker implementation for node.js with multiple network transports support.
Stars: ✭ 26 (-76.36%)
Mutual labels:  ipc
InterProcessCommunication
Inter-process Communication
Stars: ✭ 11 (-90%)
Mutual labels:  ipc
clustergrammer2-notebooks
Examples using Clustergrammer2 to explore high-dimensional datasets.
Stars: ✭ 35 (-68.18%)
Mutual labels:  binder
electron-ipc-bus
An IPC bus for Electron.
Stars: ✭ 23 (-79.09%)
Mutual labels:  ipc
CadenceSKILL-Python
Inter Process Communication (IPC) between Python and Cadence Virtuoso
Stars: ✭ 51 (-53.64%)
Mutual labels:  ipc
coronavirus-knowledge-graph
OBSOLETE: Prototype Neo4j Knowledge Graph for Coronavirus outbreaks (see NEW VERSION: https://github.com/covid-19-net/covid-19-community)
Stars: ✭ 17 (-84.55%)
Mutual labels:  binder
R-in-Jupyter-with-Binder
Example of how to use R in Jupyter notebooks and make compatible with Binder
Stars: ✭ 17 (-84.55%)
Mutual labels:  binder
dwm-ipc
A DWM patch that allows IPC communication through a UNIX socket
Stars: ✭ 55 (-50%)
Mutual labels:  ipc
python-dvr
xmeye sofia dvr nvr ipcam config
Stars: ✭ 151 (+37.27%)
Mutual labels:  ipc
analisis-numerico-computo-cientifico
Análisis numérico y cómputo científico
Stars: ✭ 42 (-61.82%)
Mutual labels:  binder
covid-19-community
Community effort to build a Neo4j Knowledge Graph (KG) that links heterogeneous data about COVID-19
Stars: ✭ 95 (-13.64%)
Mutual labels:  binder
endurox-go
Application Server for Go (ASG)
Stars: ✭ 32 (-70.91%)
Mutual labels:  ipc
openrefine-client
The OpenRefine Python Client from Paul Makepeace provides a library for communicating with an OpenRefine server. This fork extends the command line interface (CLI) and is distributed as a convenient one-file-executable (Windows, Linux, Mac). It is also available via Docker Hub, PyPI and Binder.
Stars: ✭ 67 (-39.09%)
Mutual labels:  binder
tiny-nix-ipc
Minimal Rust wrapper for using sockets as IPC with file descriptor passing
Stars: ✭ 14 (-87.27%)
Mutual labels:  ipc

binder-for-linux

binder-for-linux is an experimental project to evaluate the feasibility of porting Android Binder IPC subsystem to Ubuntu Linux.

Environment

  • Ubuntu 14.04.4 LTS
  • Linux Kernel 4.2.0-27
  • gcc 4.9.3

Codebase

  • Binder driver: mainline kernel 4.2.0-27-generic
  • Android Framework version: android-6.0.1_r46

Modifications

  • Make binder & ashmem driver dynamically loadable
    • Modified as a standard loadable kernel module
    • Use kallsyms and a shell script to generate symbol dependencies that are not exposed by kernel (e.g. get_vm_area)
  • Fix compatability issues after replacing Bionic C library with glibc
  • Fix compatibility issues of atomic library
    • Some are changed to use standard C++ atomic library (C++11 and gcc 4.9.3+ are required)
    • cutils/atomic.h is re-implemented with x86 atomic instructions
  • Dependencies to Android log daemon and SELinux library are removed
  • And other small fixes...

Get Started

To compile all from source,

$ ./project.sh makeall

Now you can install kernel modules (binder & ashmem) by,

$ ./project.sh insmod

Then run Service Manager in background,

$ sudo servicemanager/servicemanager &

We also prepared a benchmark program to perform correctness test and performance test,

$ sudo test/binderAddInts -n 100 -p 0   # correctness test with 100 iterations
$ sudo test/binderAddInts -n 10000 -p 4096   # performance test with 4K payload and 10000 iterations

Results

Performance Evaluation

We found an obvious fact that when the payload size is greater than 16K, the transmission latency grows much more rapidly compared with a small payload. After tracing more source code, we inferred that this may be due to the use of the single global lock. The Binder driver heavily uses a global lock to protect the critical sections, this may lead to low utilization in high concurrency situation. Also, during the driver initialization phase, the Binder driver created a bottom half – workqueue, to handle the release of system resource and buffer. During the benchmark with larger payload and higher iterations (e.g. 10000 per test), the workqueue need to handle the release request more frequently; however, the implementation of release function also need to acquire the global lock, which leads to much lower performance for real data transmission.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].