Using shared memory

In modern operating systems running on hardware that supports an MMU (short for memory management unit), each application runs as a process and has its memory isolated from other applications.

Such isolation brings important reliability benefits. An application cannot accidentally corrupt the memory of another application. Similarly, an application that accidentally corrupts its own memory and crashes can be shut down by the operating system without affecting other applications in the system. Decoupling the functionality of the embedded system into several isolated applications that communicate with each other over a well-defined API significantly decreases the complexity of the implementation, resulting in improved stability.

The isolation, however, incurs costs. Since each process has its own isolated address space, data exchange between two applications implies data copying, context switching, and the use of operating system kernel synchronization mechanisms that can be relatively expensive.

Shared memory is a mechanism provided by many operating systems to declare certain memory regions as shared. This way,  applications can exchange data without copying. This is especially important for the exchange of large data objects, such as video frames or audio samples.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.184.90