In this page we would like to present our method to allocate and use shared memory for communication between Real-Time Linux task and user-space task.
Our method doesn't need any preallocated buffers you had to reserve at the boot of you rtl-kernel. Its trully dynamicaly allocated memory in the runtime.
So now directly to the problem and how this problem can solved. The most problematic thing with real-time task is, how to move datas collected from in the real-time to the user's task, which is obvisiousily not real-time. The problem with memory is, it may be paged-out - this would cause big trables for the real-time task to wait for the memory to be paged in, so for this reason, memory has to be always in the actual RAM. This might be accomplished in several ways. Currently the most used method is presented in two articles on www.rtlinux.org
Our method is oriented to those people, who would need only small portion of memory (we will test the vmalloc in near future). Currently we can use upto 128KB of physically contignuous memory (if such a memory is available at the run time)
See our current implementation of this method this C-source:
phantom_main.c
(pick the latest revision number)
| VRLab | Phantom |