IPC (inter-process communication, interprocess communication) can have three ways of sharing information (along with the file system, with the kernel, with shared memory). (Of course, although it is interprocess communication, it can also be
System V and POSIX
When we conduct inter-process communication in Linux, such as semaphores, message queues, and shared memory, we will find two types: System V and POSIX. Let's briefly introduce them today.
POSIX:
POSIX (Portable Operating System
POSIX semaphores are real-time extensions that are part of the POSIX standard system interface definition. The XSI IPC defined in the SUS (Single UNIX specification) specification also defines the system interface that people commonly refer to as
Huaqing Vision LecturerWhen we communicate between processes in a Linux system, we find that for example, shared memory, semaphores, Message Queuing, and so on, there are two types of System V and Poxis. So let's explore what the System V and Poxis
Description
Shared memory is the fastest available IPC format. It allows multiple unrelated (unrelated) processes to access the same part of the Logical Memory.
To transmit data between two processes, shared memory is an extremely efficient solution.
Note: Only for learning Exchange, reprint please specify the source
First, the preface
There are certain limitations to using signals and pipelines for process communication. For example, the use of signal transmission of information is limited,
In the POSIX standard, the semaphore is divided into two types, one is the nameless semaphore, and the other is a well-known semaphore. The nameless semaphore is typically used for inter-thread synchronization or mutual exclusion, and a well- known
1. Create/acquire a shared memory#include #include / * for Mode constants */#include / * for O_* Constants */int Shm_open (const char *name, int oflag, mode_t mode);Parameters:Name: Shared memory names; Oflag: With the Open
Looked at Apue's chapter15, only focused on 15.10, learned the POSIX semaphore. The POSIX semaphore has the advantage of better performance than the XSI signal, and the performance on the Linux3.2.0 platform is greatly improved. Where the named
You may have heard or encountered something like this: a system administrator Cainiao accidentally enters & quot; chmod-R777/& quot;, leading to a huge tragedy, this severely damaged the entire system. In daily management, we have many tools that
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.