IPC机制概念 [英] IPC mechanisms concepts

查看:229
本文介绍了IPC机制概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解这些IPC机制概念的操作系统 - 共享内存,消息系统,套接字,RPC,RMI

I want to understand these IPC mechanism concepts in OS - Shared Memory, Message System, Sockets, RPC, RMI

如何做不同的操作系统实现这些。特别是Android操作系统?

How do different operating systems implement these. Specifically Android operating system?

推荐答案

IPC是进程间通信在OS机制的大讨论中的概念的话,我觉得我们在这里不能覆盖所有这一切,

IPC is inter-process communication mechanisms in OS is large discussion concept so, I think here we can't cover all this,

一些低层次的东西:

这里讨论的IPC机制是在最低水平,所有其他CPU间IPC机制使用它作为基础。例如,通过ARM11处理器一个TCP / IP连接到另一个处理器最终通过此IPC机制。诊断信息的消息,依赖于这个低级别的另一个例子IPC。

The IPC mechanism discussed here is at the lowest level—all other inter-CPU IPC mechanisms use it as the base. For example, a TCP/IP connection through the ARM11 processor to another processor ends up going through this IPC mechanism. Diagnostic messages are another example of messages that rely on this low-level IPC.

的IPC机制与双方,一个客户端,它面临的内核,并提供接口的基于回调的风格,而CPU方面,它提供的接口,其它CPU来实现。

The IPC mechanism is implemented with two sides—a "client side," which faces the kernel and provides a callback-based style of interface, and a "CPU side," which provides the interface to the other CPUs.

  • 的CPU端被实现为共享存储器接口,具有 中断和一个门铃机制。在最高级别,送 从ARM11到另一个CPU的邮件,邮件内容被放在 在共享存储器中的缓冲器和一个硬件端口发痒到 指示该数据是可用的其它CPU

  • The CPU side is implemented as a shared-memory interface, with interrupts and a "doorbell" mechanism. At the highest level, to send messages from the ARM11 to another CPU, the message content is placed in a buffer in shared memory and a hardware port is tickled to indicate to the other CPU that data is available.

在反方向上,该数据被放置到共享存储器由 其它CPU和一个硬件中断触发的ARM11。 这种硬件中断导致的ARM11检查共享 存储器的缓冲区,检索该消息,并将其路由到客户端。

In the reverse direction, the data is placed into shared memory by the other CPU and a hardware interrupt is triggered on the ARM11. This hardware interrupt causes the ARM11 to examine the shared memory's buffer, retrieve the message and route it to the client.

但是,为了更具体到Android:

IPC在Android中,它描述了不同类型的机器人部件是如何沟通的机制。

IPC in android, It describes the mechanism how different types of android components are communicated.

Android的实现用于通信和安全程序之间的协调几个关键工具。这些机制使Android应用程序运行在后台流程的能力,提供的服务所消耗的其他应用程序,安全地共享相关数据,启动其他程序,和重用的组件从其他应用程序安全。

Android implements a few key tools used to communicate with or coordinate between programs securely. These mechanisms give Android applications the ability to run processes in the background, offer services consumed by other applications, safely share relational data, start other programs, and reuse components from other applications safely.

  • 大部分的进程间通信(IPC)出现在Android上的 通过数据结构周围的传球被称为完成 意图。这些是具有几个的信息集合 预期性质的系统可以用它来帮助找出哪里 发送意图,如果开发商不明确。 Action属性 EX presses的目的是什么(在Intent.ACTION_VIEW行动 指示该数据要被显示给用户,例如)。 数据属性是一个可选的URI,并可以指向一个文件, 接触,网页,电话号码,等等。意图也可能 有键/值对所谓的群众演员,以及国旗的集合, 组件,以及其他更先进的功能。

  • Much of the interprocess communication (IPC) that occurs on Android is done through the passing around of a data structures called Intents. These are collections of information that have a few expected properties the system can use to help figure out where to send an Intent if the developer wasn’t explicit. The Action property expresses what the Intent is for (the Intent.ACTION_VIEW action indicates that the data is to be displayed to the user, for example). The data property is an optional URI and could point to a file, contact, web page, phone number, and so on. Intents also potentially have a collection of key/value pairs called extras, as well as flags, components, and other more advanced features.

每个IPC机制的使用在某些能力的意图和是 可能有些熟悉的大多数Android开发。然而, 因为安全地使用这些的关键是Android安全,

Each of these IPC mechanisms uses Intents in some capacity and is probably somewhat familiar to most Android developers. However, because using these safely is key to Android security,

1) 意图 是消息的组件可以发送和接收。这是进程之间传递数据的普遍机制。随着意图的帮助下可以启动服务或活动,调用广播接收器等。

1) Intents are messages which components can send and receive. It is a universal mechanism of passing data between processes. With help of the intents one can start services or activities, invoke broadcast receivers and so on.

2) 捆绑 是实体数据通过。它类似于一个对象的序列,但在机器人要快得多。包可以从意图通过 getExtras来了()方法。

3) 粘合剂 是这允许活动服务获得参考到另一个服务的实体。它允许不能简单地将消息发送到服务,但直接调用它们的方法。

3) Binders are the entity which allows activities and services obtain a reference to another services. It allows not simply send messages to services but directly invoke methods on them.

有关更多信息看:

  1. 把握Android的IPC机制

Android的安全对象IPC机制

这篇关于IPC机制概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆