Can anyone tell me if the Linux kernel has access to RAM Disks and if so, how can we forbid it? I want to have a RAM Disk that I'm the only one who has access and can change the information, and I want to be sure that the OS doesn't manipulate it.EDIT :i know that we can mount a ram disk an use it like a hard drive , but does OS have access to this ram disk and manipulate its content whenever it needs extra RAM for its processes ?  is there any other way that i can reserve a chunk of memory that OS has not access to it ?EDIT 2 : is there a way that i can stop ram disk data moving to swap space ?i want to be sure that the Data i have written in this RAM Disk will always remain in RAM(memory)and i also wanna know if kernel or other processes overwrite RAM Disk DATA ? IN CASE THEY NEED MORE MEMORY !!
How can I forbid the Linux kernel from accessing a certain RAM disk?
linux;ramdisk
This is impossible because it's the Linux kernel that creates and manages the RAM disk.Responding to a later amendment to your question, asking how to reserve a chunk of memory that the OS cannot access. The OS manages all your access to the hardware. That is - by definition - part of what it's there for. So, no, it's not possible to reserve a chunk of memory without the OS reserving it for you.If you have assigned a portion of memory to your RAM disk, content written to that RAM disk will not get overwritten. Your available memory is shared between the RAM disk and everything else.