Home > OS >  Master, master high x86 secondary paging memory problem!!
Master, master high x86 secondary paging memory problem!!

Time:09-27

The following discussion is standing on the Angle of the development of the operating system kernel, the entire PC operating system, in 80386 the protection mode, paging mechanism is secondary paging, page directory is 1024, the secondary character is 1024 pages, the page directory base address is designated by the CR3, registers, secondary pages zhen base address is designated by "page directory", only 10 page directory, is the only designated to 4 m bytes starting position, then the secondary pages your virginity can only be in the first "0" on page 4 m began, programming tasks that can be used memory began from the first "page 1", is it?
If so I don't understand, first question: how the operating system under the condition of the secondary paging, read and write operations in 4 m of data "page of her virginity"? That is operating the secondary page table in physical memory?
The second question: if a program memory tasks need to be 6 m, you need to give it a 1536 - page pieces, need at least distributed in more than 2 page directory block, also need at least two secondary pages zhen table, how will the 1536 pages, page mapped to physical memory? Don't need to consider "virtual memory", this problem can change a view: how to more than 1024 pages of her virginity memory mapped to a physical address,