A New Dynamic IPC-Memory Allocator Based on a Paging Approach
Résumé
In a distributed system, multiple processes can communicate and exchange data. These processes can be either local (on the same host machine), or remote (on different ones). The POSIX IPC standard provides a set of mechanisms (such as shared memory, message queues and semaphores) for data sharing and synchronization between local processes. In particular, the shared memory mechanism allows multiple local processes/threads to share the same address space. However, this mechanism only allows the sharing of data that belongs to the basic types (such as integer, float, char, ...) and does not support natively the share of pointers. In addition, the shared memory area presents in the form of a contiguous space, which can lead to fragmentation (internal/external) and compaction problems during use.
In this paper, we present a new dynamic shared memory allocator (DSMA) addressing these limitations. Other aspects are also taken into account by the allocator, such as portability, performance (response time for an allocation request) or the consistency of shared data in a concurrent access to the same shared memory space. The allocator is in the form of a C/C++ API, compiled and tested on three operating systems: Linux, Windows and Mac-OS.