Ucore lab2 learning: Virtual Memory

Source: Internet
Author: User

I think this lab is mainly used to understand how Virtual Memory maps to physical memory. In csapp, MMU and TLB circuits are used for conversion. X86 uses a Level 2 page table.

We also need to understand stack frame (such as lab1 project 4.1.1): switch_to_u2k and swith_to_k2u. There are two methods. One is to rewrite the stackframe TSS. One is to directly use ASM to rewrite gate descriptor.

Csapp: each process has a VM and page table.

But why does the BIOS have different positions in xv6 and ucore? (Kernal. LD) both specify the entry at 0x100000 (physical address ).

In the csapp, it explains the user/kernal stack and how the process directly shares global variables and kernel (xv6 book: each process has 2 stacks: User stack, and kernel stack)

As mentioned in xv6, ing two VMS to the same physical address is a common method of page table!

// Return addressreturn & (pte_t *) kaddr (pde_addr (* pdepage) [PTX (LA)];

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.