Difference between revisions of "Template:BIPS/Main contents"

From RidgeRun Developer Connection
Jump to: navigation, search
(What is Buffer Interprocess Sharing?)
(What is Buffer Interprocess Sharing?)
Line 23: Line 23:
  
  
Buffer Interprocess Sharing or BIPS is a variant of a common IPC that allows communication between processes. In this case, BIPS allows sharing data buffers between two or more processes. They can be classified as Producers or Consumers, according to their role in the system. The producer is in charge of generating and filling the information of the buffers that will be read by the Consumers. The synchronization between these entities is handled by the Signaler, which ensures that all operations are concurrent-safe. This means that Consumers can only read buffers that are fully written by Producers, and that Producers can only write buffers that are no longer being read by Producers. These buffers are created and managed by a shared structure known as the Buffer Pool which has a fixed capacity. Again, the synchronization between the BP and the Consumers/Producers is handled by the Signaler.
+
Buffer Interprocess Sharing, or BIPS, is a variant of a common IPC that allows communication between processes. In this case, BIPS allows sharing data buffers between two or more processes with zero copy. They can be classified as Producers or Consumers according to their role in the system. The producer is responsible for generating and filling in the information on the buffers that the Consumers will read. The synchronization between these entities is handled by the Signaler, which ensures that all operations are concurrent-safe. This means that Consumers can only read buffers that are fully written by Producers and that Producers can only write buffers already read by Producers. These buffers are created and managed by a shared structure known as the Buffer Pool, which has a fixed capacity. The Signaler handles the synchronization between the BP and the Consumers/Producers.
 
<br>
 
<br>
 
<br><br>
 
<br><br>
[[File:bips_flow2.png|500px|frameless|center|BIPS communication between two processes]]
+
[[File:bips_flow2.png|500px|frame|center|BIPS communication between two processes]]
 
<br>
 
<br>
 
<br><br>
 
<br><br>
  
[[File:bips_flow1.png|500px|frameless|center|BIPS communication betwen one Producer and N Consumers]]
+
[[File:bips_flow1.png|500px|frame|center|BIPS communication betwen one Producer and N Consumers]]
 
<br>
 
<br>
 
<br><br>
 
<br><br>

Revision as of 10:49, 14 December 2022

Buffer Interprocess Sharing!

Buffer Interprocess Sharing.




Buffer Interprocess Sharing

This wiki is a user guide for our Buffer Interprocess Sharing project.

What is Buffer Interprocess Sharing?

Buffer Interprocess Sharing, or BIPS, is a variant of a common IPC that allows communication between processes. In this case, BIPS allows sharing data buffers between two or more processes with zero copy. They can be classified as Producers or Consumers according to their role in the system. The producer is responsible for generating and filling in the information on the buffers that the Consumers will read. The synchronization between these entities is handled by the Signaler, which ensures that all operations are concurrent-safe. This means that Consumers can only read buffers that are fully written by Producers and that Producers can only write buffers already read by Producers. These buffers are created and managed by a shared structure known as the Buffer Pool, which has a fixed capacity. The Signaler handles the synchronization between the BP and the Consumers/Producers.


Error creating thumbnail: Unable to save thumbnail to destination
BIPS communication between two processes




Error creating thumbnail: Unable to save thumbnail to destination
BIPS communication betwen one Producer and N Consumers





RidgeRun also makes a binary-only evaluation version available. Please refer to Contact Us to get an evaluation binary.

Supported Formats

BIPS is used to communicate processes that need to share information, which helps to optimize memory usage and applications performances.

The backend is responsible for allocating the pool of buffers with a fixed size, which will be known prior to processing. The reason behind this is to avoid expensive allocation and free operations at runtime and to avoid memory fragmentation.

Shared Memory

Shared Memory is a standard easy way to communicate data between processes (IPC - Inter Process Communication). In this methodology, data is allocated in a commonplace. So, when any process updates some value in the shared zone the other processes can see the updated value immediately.

There are uses the POSIX Shared Memory (shm).

Anyways, Shared Memory methodology has some issues with data consistency, because a process can not be assured to use the shared zone properly.

For example: Let's suppose the existence of processes A, B, and C; processes A and B are Writers and process C is a Reader process that shows memory status information.

What happens if A writes "hello" on memory and B writes "world" at the same time? In the best of the cases, process C read "hello" or "world", but the common case is that a Segmentation Fault error would be received since the resource is being used by another process. In order to solve this problem, the processes are synchronized using Semaphores.

Semaphore is a technique to manage concurrent processes by using a simple integer value. A semaphore is simply an integer variable that is shared between threads. This variable is used to solve the critical section problem and to achieve process synchronization in the multiprocessing environment.

In summary, the Shared Memory method uses a common memory space to read and write data, where synchronization is performed by means of some scheduling method (semaphores) to employ the use of the shared resource.


Error creating thumbnail: Unable to save thumbnail to destination



Message Passing

The message-passing approach proposes communication between processes via message. In this method, processes communicate with each other without using any kind of shared memory.

For example:

Let's suppose the existence of processes A, and B; processes A want to send data to process, they proceed as follows:

  • Establish communication.
  • Process A sends a message to a Consumer (Process B).
  • Process B receives the data from the Producer (Process A).

The Message Passing method, specifically speaking of the use of the NvSci API, provides a communication channel where two totally independent processes can share data with each other withouth worry about memory faults.


Error creating thumbnail: Unable to save thumbnail to destination




Tested Platforms


RidgeRun Support

RidgeRun provides support for embedded Linux development for NVIDIA, Xilinx, Freescale/NXP, and Texas Instruments platforms, specializing in multimedia applications. This page contains detailed guides and information on how to get started with Buffer Interprocess Sharing and start using its full capabilities.

To get up-to-speed with your Buffer Interprocess Sharing, start by clicking below:

Error creating thumbnail: Unable to save thumbnail to destination



RidgeRun Resources

Quick Start Client Engagement Process RidgeRun Blog Homepage
Technical and Sales Support RidgeRun Online Store RidgeRun Videos Contact Us

OOjs UI icon message-progressive.svg Contact Us

Visit our Main Website for the RidgeRun Products and Online Store. RidgeRun Engineering informations are available in RidgeRun Professional Services, RidgeRun Subscription Model and Client Engagement Process wiki pages. Please email to support@ridgerun.com for technical questions and contactus@ridgerun.com for other queries. Contact details for sponsoring the RidgeRun GStreamer projects are available in Sponsor Projects page. Ridgerun-logo.svg
RR Contact Us.png
Error creating thumbnail: Unable to save thumbnail to destination