Reputation: 589
Assume that we have the CPU that has MMU, which works as follows:
Now imagine that, we are running several processes (of course in non-privileged mode). When we want to allocate additional memory for any process, it just apply following scenario in my opinion. We execute system call(s) and OS serves that (in privileged mode) by updating process page table or report some error code.
My question: But now, when we want to allocate some memory for kernel, we must update all tables of all processes in their kernel part addresses? As far as I know there isn't any kernel page table, which can theoretically solve that problem (but brings others), in CPUs that works similarly. So how to solve that situation, if is possible to occur?
Sorry for my English.
Upvotes: 1
Views: 2888
Reputation: 589
Finally, I found solution. I think, this link say it all:
Very important to understand that is Table 6.13. Translation table size. In a short, the virtual space of every process is divided into kernel space and user space, of course. However, both spaces have own table. When process switch, kernel table pointer is constant, but user table pointer is changed. I hope, you understand that.
Sorry for my English.
Upvotes: 4