http://linux.die.net/man/2/mlockall
mlockall() locks all of the calling process’s virtual address space into RAM, preventing that memory from being paged to the swap area.
why is this important in real time systems?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It ensures the memory is always in RAM and never moved to the swap disk. This makes accessing those memory locations much faster as disks are extremely slow compared to RAM.
In a realtime system (linux is NOT a RTS btw!) you need extremely low latencies so a memory access resulting in a disk access is usually not acceptable inside time-critical code.