SEL4 通过Endpoint实现的进程间的通信方法, IPC Endpoint:用来辅助进程间IPC,有两种类型的IPC Endpoint,一种是Synchronous Endpoint,另一种是Asynchronous Endpoint,顾名思义,一种是同步的,即在信息没有被接受时会阻塞发送消息的线程,另一种是异步的,只能传递短消息,但不会发生阻塞。----------“IPC uses synchronous and asynchronous endpoints (port-like destinations without in-kernelbu_ering) for inter-thread communication, with RPC facilitated via reply capabilities.”
MACH: 通过 锁 和信号量机制来进程通信----“As an OS X kernel programmer, you have many choices of synchronization mechanisms at your disposal. The kernel itself provides two such mechanisms: locks and semaphores.”
“A lock is used for basic protection of shared resources. Multiple threads can attempt to acquire a lock, but only one thread can actually hold it at any given time (at least for traditional locks—more on this later). While that thread holds the lock, the other threads must wait. There are several different types of locks, differing mainly in what threads do while waiting to acquire them.“ 锁是用来共享资源的,一个锁只能在一个时刻被用到一次 锁的类型由线程怎么获取他们而定义
除了锁和信号量之外,还可以使用某些低级同步原语,例如test和set,以及许多其他原子操作 In addition to locks and semaphores, certain low-level synchronization primitives like test and set are also available, along with a number of other atomic operations. msleep, wakeup, and wakeup_one ----条件变量 -----OS X(通常是Mach)具有三种基本类型的锁:自旋锁,互斥锁和读写锁。------OS X (and Mach in general) has three basic types of locks: spinlocks, mutexes, and read-write locks.
L4:“The classical method is transferring messages between threads by the p-kernel.IPC always enforces a certain agreement between both parties of a communication: the sender decides to send information and determines its contents; the receiver determines whether it is willing to receive information and is free to interpret the received message.“ --------经典的方法是通过p-kernel在线程之间传输消息。IPC总是在两者之间执行某种协议,通信双方:发送方决定,发送信息并确定其内容,接收者决定它是否愿意接收信息,并且可以自由地解释接收到的消息。
“The natural abstraction for hardware interrupts is the IPC message.“,硬件的中断被认为是一个发送空线程的线程,由硬件中断的机制,从用户态转换为核心态来处理。
334




被折叠的 条评论
为什么被折叠?



