Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Process communication: shared storage, audio transmission and pipeline communication

2025-02-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Process communication refers to the exchange of information between processes. The PV operation is the primary communication method, and the hierarchical communication method refers to the communication method that transmits a small amount of data with high efficiency. Primary communication methods are mainly divided into the following three categories.

Shared storage

In the process of communication, there is a shared space that can be visited directly, and the information is exchanged between the processes of stopping writing / reading to this shared space. When stopping the write / read operation to the shared space, it is necessary to use synchronous mutual exclusion tools (such as P operation, V operation) to master the writing / reading of the shared space. Shared storage is divided into two types: the sharing of primary methods is based on data construction, and the primary method is based on storage area sharing. The operation only serves to provide shared storage space and synchronous mutex tools for the communication process, while the data exchange is completed by the user's own read / write instructions.

It is important to note that the user process space is generally independent, in order to make the two user process shared space must be completed through special piecemeal misappropriation, and the threads in the process share the process space naturally.

Audio transmission

In the piecemeal audio transmission, the data exchange between processes is based on localized audio (Message) as a unit. If there is no shared space between the communication processes that can be visited directly, the audio transmission method of operating piecemeal supply must be applied to complete the process communication. In the process, the data exchange is stopped through two primitives: sending audio and receiving audio.

1) Direct communication method: the sending process sends the audio message directly to the receiving process, and hangs it on the audio buffer queue of the receiving process, and the receiving process obtains the audio from the audio buffer queue.

2) Direct communication method: the sending process sends the audio message to some two-end entity, and the acceptance process obtains the audio message from the two-end entity. This kind of two-end entity is commonly called mailbox, and this communication method is also called mailbox communication method. This communication method is widely used in computer collection, and the response communication is called e-mail bits and pieces.

Pipeline communication

Pipeline communication is a special method of audio transmission. The so-called "pipeline" refers to a shared file, alias pipe file, used to connect a read process and a write process to complete the communication between them. The sending process (that is, the writing process) that supplies output to the pipeline (that is, the writing process) feeds a small amount of data into (writing) the pipeline in the form of a character stream, while the acceptance process (that is, the reading process) that accepts the input from the pipeline accepts (reads) the data from the pipeline. In order to reconcile unilateral communication, the pipeline mechanism must provide the ability to reconcile the following three aspects: mutual exclusion, synchronization and affirmation of the existence of each other.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report