linux特权级, linux通信机制, Dalvik, android binder

2024-01-01 19:38

本文主要是介绍linux特权级, linux通信机制, Dalvik, android binder,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Android Binder
Android Interprocess Communication
Thorsten Schreiber
First Advisor: Juraj Somorovsky
Second Advisor: Daniel Buβmeyer

 

 

在看《Android Binder》文档时,读到:

1. 特权级英文叫ring,并且是需要硬件支持的。Intel的硬件实现了4个特权级,linux只用0和3。

2. linux通信机制:信号,管道,套接字,消息队列,信号量,共享内存。

3. Native的含义是可以跑在具体机器平台上得程序,不同于跑在虚拟机上的Java。

4. Dalvik Vitual Machine:不同于JVM。JVM关注平台无关性,DVM关注Arm的适配、性能、功耗等。两者设计理念不同。

 

 

1. 特权级

More abstractly, the concept of security boundaries of an operating system introduces the term ring.

Note, that this must be a hardware supported feature of the platform. A certain group of rights is assigned to a ring.

Intel hardware supports four rings, but only two rings are used by Linux.

 

2. linux通信机制

Signals

  Oldest IPC method. A process can send signals to processes with the same uid and gid or in the same process group.

Pipes

  Pipes are unidirectional bytestreams that connect the standard output from one process with the standard input of another process.

Sockets

  A socket is an endpoint of bidirectional communication. Two processescan communicate with bytestreams by opening the same socket.

Message queues

  Processes can write a message to a message queue that is read-able for other Processes.

Semaphores

  A semaphore is a shared variable that can be read and written by many processes.

Shared Memory

  A location in system memory mapped into virtual address spaces of two processes, that each process can fully access.

 

3. Native Code

Programs compiled for a specific platform are called native.

Because Java is executed in a virtual machine with its own byte-code, no native code can be executed directly.

Due to the need to access low-level os mechanism like kernel calls, Java has to overcome this obstacle.

This is done by the Java native interface (JNI) , which allows Java to execute compiled code from libraries written in other languages, e.g. C++.

 

4. Dalvik

The Sun JVM is stack based, because a stack machine can be run on every hardware. Hardware and platform independence were major design principles of Java.

The DVM is register based for performance reasons and well adapted to ARM hardware. This is a different design principle, taking the advantage of hardware independence for high performance and less power consumption, which is essential for mobile purposes with limited battery capability.

The possibility to use the Java native interface weakens the security guarantying property of Java to implicit checking the bounds of variables and to encapsulate system calls and
the force to use JVM defined interfaces to the system.

The use of native libraries can allow bypassing the type and border checking of the virtual machine and opens the door to stack-overflow attacks.

 

 

这篇关于linux特权级, linux通信机制, Dalvik, android binder的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/560303

相关文章

jdk21下载、安装详细教程(Windows、Linux、macOS)

《jdk21下载、安装详细教程(Windows、Linux、macOS)》本文介绍了OpenJDK21的下载地址和安装步骤,包括Windows、Linux和macOS平台,下载后解压并设置环境变量,最... 目录1、官网2、下载openjdk3、安装4、验证1、官网官网地址:OpenJDK下载地址:Ar

linux本机进程间通信之UDS详解

《linux本机进程间通信之UDS详解》文章介绍了Unix域套接字(UDS)的使用方法,这是一种在同一台主机上不同进程间通信的方式,UDS支持三种套接字类型:SOCK_STREAM、SOCK_DGRA... 目录基础概念本机进程间通信socket实现AF_INET数据收发示意图AF_Unix数据收发流程图A

linux环境openssl、openssh升级流程

《linux环境openssl、openssh升级流程》该文章详细介绍了在Ubuntu22.04系统上升级OpenSSL和OpenSSH的方法,首先,升级OpenSSL的步骤包括下载最新版本、安装编译... 目录一.升级openssl1.官网下载最新版openssl2.安装编译环境3.下载后解压安装4.备份

Nginx之upstream被动式重试机制的实现

《Nginx之upstream被动式重试机制的实现》本文主要介绍了Nginx之upstream被动式重试机制的实现,可以通过proxy_next_upstream来自定义配置,具有一定的参考价值,感兴... 目录默认错误选择定义错误指令配置proxy_next_upstreamproxy_next_upst

linux打包解压命令方式

《linux打包解压命令方式》文章介绍了Linux系统中常用的打包和解压命令,包括tar和zip,使用tar命令可以创建和解压tar格式的归档文件,使用zip命令可以创建和解压zip格式的压缩文件,每... 目录Lijavascriptnux 打包和解压命令打包命令解压命令总结linux 打包和解压命令打

Android开发中gradle下载缓慢的问题级解决方法

《Android开发中gradle下载缓慢的问题级解决方法》本文介绍了解决Android开发中Gradle下载缓慢问题的几种方法,本文给大家介绍的非常详细,感兴趣的朋友跟随小编一起看看吧... 目录一、网络环境优化二、Gradle版本与配置优化三、其他优化措施针对android开发中Gradle下载缓慢的问

linux如何复制文件夹并重命名

《linux如何复制文件夹并重命名》在Linux系统中,复制文件夹并重命名可以通过使用“cp”和“mv”命令来实现,使用“cp-r”命令可以递归复制整个文件夹及其子文件夹和文件,而使用“mv”命令可以... 目录linux复制文件夹并重命名我们需要使用“cp”命令来复制文件夹我们还可以结合使用“mv”命令总

Linux使用cut进行文本提取的操作方法

《Linux使用cut进行文本提取的操作方法》Linux中的cut命令是一个命令行实用程序,用于从文件或标准输入中提取文本行的部分,本文给大家介绍了Linux使用cut进行文本提取的操作方法,文中有详... 目录简介基础语法常用选项范围选择示例用法-f:字段选择-d:分隔符-c:字符选择-b:字节选择--c

Linux使用nload监控网络流量的方法

《Linux使用nload监控网络流量的方法》Linux中的nload命令是一个用于实时监控网络流量的工具,它提供了传入和传出流量的可视化表示,帮助用户一目了然地了解网络活动,本文给大家介绍了Linu... 目录简介安装示例用法基础用法指定网络接口限制显示特定流量类型指定刷新率设置流量速率的显示单位监控多个

ElasticSearch+Kibana通过Docker部署到Linux服务器中操作方法

《ElasticSearch+Kibana通过Docker部署到Linux服务器中操作方法》本文介绍了Elasticsearch的基本概念,包括文档和字段、索引和映射,还详细描述了如何通过Docker... 目录1、ElasticSearch概念2、ElasticSearch、Kibana和IK分词器部署