摘要: 6. Devices A device driver hides the hardware device’s communication protocols from the operating system and allows the system to interact with the device through a standardized interface. Processes can communicate with a device driver via file-like objects. 6.1 Device Types A character device re... 阅读全文
posted @ 2010-02-12 11:10 刘超觉先 阅读(822) 评论(0) 推荐(0) 编辑
摘要: 5. Interprocess Communication Five types of interprocess communication: Shared memory permits processes to communicate by simply reading and writing to a specified memory location. Mapped memory is similar to shared memory, except that it is associated with a file in the filesystem. Pipes permit... 阅读全文
posted @ 2010-02-12 11:06 刘超觉先 阅读(849) 评论(0) 推荐(0) 编辑
摘要: 4. Threads To use the POSIX standard thread API (pthreads), link libpthread.so to your program. 4.1. Thread Creation Each thread in a process is identified by a thread ID, pthread_t. The pthread_self function returns the thread ID of the current thread. This thread IDs can be compared with the p... 阅读全文
posted @ 2010-02-12 11:00 刘超觉先 阅读(1307) 评论(0) 推荐(0) 编辑
摘要: 3. Processes Each process is identified by its unique process ID Every process has a parent process. Processes are arranged in a tree, with the init process at its root A program can obtain the process ID with getpid() and can obtain the process ID of its parent process with the getppid(). #incl... 阅读全文
posted @ 2010-02-12 10:48 刘超觉先 阅读(946) 评论(0) 推荐(0) 编辑