Is a static data structure for paging possible?
Posted: Wed Dec 03, 2025 5:46 pm
Hello guys, I'm intrigued by A. S. Tanenbaum's claim that there is no malloc in the Minix kernel, everything is (over)provisioned instead using compile-time constants. At a first glance everything seems fine; the array of processes is fixed-length, among other things. I am almost halfway through the Minix book and I'm exploring the source code for Minix 2.0.0 and 3.1.4 (which should have paging).
But how can Minix avoid dynamic memory management when it comes to constructing page tables for user processes? The `struct proc` type contains no mention of page tables. Pre-allocating a structure to keep the entire page table radix tree for a single process, let alone 64 or however many you #define, would take 512^4*8=512GB, so how is it possible?
I think it might have something to do with the VM server, but I don't know how a user process could possibly modify its own page table, let alone other processes' or the kernel's. I thought scheduling, IPC and virtual memory management comfortably fit the responsibilities of a microkernel, so why would VMM be a user process?
Thanks
But how can Minix avoid dynamic memory management when it comes to constructing page tables for user processes? The `struct proc` type contains no mention of page tables. Pre-allocating a structure to keep the entire page table radix tree for a single process, let alone 64 or however many you #define, would take 512^4*8=512GB, so how is it possible?
I think it might have something to do with the VM server, but I don't know how a user process could possibly modify its own page table, let alone other processes' or the kernel's. I thought scheduling, IPC and virtual memory management comfortably fit the responsibilities of a microkernel, so why would VMM be a user process?
Thanks