1

I don't quite understand this picture from the CS:APP book.

Text

It shows how the kernel virtual memory of a process has a region different from other processes.

Does this mean, that the kernel in the context of process A, won't be able to see the process specific data in the context of process B?

Is the only way the kernel can access this data, by context switching to process B and using B's page table, or can it be accessed from process A?

1

Your confusion is understandable; the diagram is mistaken, as indicated in the errata for the book:

p. 829, Figure 9.26. The kernel portion of the address space is identical for each process. There is no part of the kernel virtual memory that is different for each process.

(On x86-64 specifically, which is the architecture used in the diagram — as indicated by the reference to %rsp — the kernel has a full mapping of physical memory, so any page in memory appears in the kernel’s virtual memory anyway. See What's inside the kernel part of virtual memory of 64 bit linux processes?)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.