1

While I read understanding the linux kernel, I got this sentence

process descriptors are stored in dynamic memory.

As far as I know, for 32-bit computer system:

Kernel reserved almost 128MB High Memory in the highest virtual address to address the Dynamic physical address.

my question is: although the high memory can address all physical address, it can only address 128MB at most at once. The kernel data structure is so much that it could exceed 128MB. If kernel want to remap some of the high memory, the virtual address of some data structure saved in high memory might be invalid. How can kernel save more than 128MB kernel data structure in dynamic physical memory.

Although I have tried hard to express clear and obey this site's rules, there could still be some thing I made wrong. I'm very sorry if any.

1 Answer 1

1

What does "The kernel data structure is so much that it could exceed 128MB." mean? There is no "kernel data structure". There are things the kernel allocates, but they are few pages long tops. In particular there is no "single object" which would be > 128MB long.

If something is physically really big (say there is a file entirely read into RAM and it takes 512MB), the kernel just maps and unmaps physical pages as it needs them. In particular there is no need for the file to be mapped entirely at the same time and virtual addresses the parts get temporarily map into are meaningless.

Also note that today x86_64 provides a 128TB address space, so there are no shenaningans of the sort.

Sign up to request clarification or add additional context in comments.

3 Comments

thanks a lot, I think data such as process descriptor struct_as are kernel data structure. Would it be possible that there are so many processes that all process descriptors exceed 128MB?
I don't see how that's of any importance. Are you sure you understand what the rest of memory is used for?
To be honest, I am not sure I understand. Sorry I have typo in my last response and I find no way to reedit it. The struct_as should be struct_task. Let me try another way to express. I assumed all process descriptors are over 128MB. As a result, kernel can not access all these process descriptors. At some time, kernel use some of its high memory to access some of these process descriptors. When it wants to access the remain process descriptors, how does it know where the remain process descriptors are saved, which physical pages the high memory should map?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.