Starting from:
$30

$24

Week6 Assignment


Please complete a report in English in English in English in English and upload the corresponding codes.

The files should be uploaded directly without compression without compression without compression without compression

The files to be submitted for this assignment are:

    1. report.pdf

    2. default_pmm.c

    3. best_fit_pmm.c



    1. [15 pts] Read Chapter 15 of “Three Easy Pieces” (https://pages.cs.wisc.edu/~remzi/OSTEP/vm -mechanism.pdf ) and explain how do the CPU hardware and the operating system cooperate in the procedure of address translation.


    2. [15 pts] Read Chapter 16 ”( https://pages.cs.wisc.edu/~remzi/OSTEP/vm-segmentation.pdf) and chapter 18 (https://pages.cs.wisc.edu/~remzi/OSTEP/vm-paging.pdf ) of “Three Easy Pieces” and compare egmentation and paging. Your answer should cover all aspects (e.g., size of chunks, management of free space, context switch overhead, fragmentation, status bits and protection bits, etc.) and compare them side-by-side.


    3. [15 pts] Consider a system with the following specifications:

46-bit virtual address space


Page size of 8 KBytes


Page table entry size of 4 Bytes


Every page table is required to fit into a single page


How many levels of page tables would be required to map the entire virtual address space? Please document the format of a virtual address under this translation scheme. Briefly explain your rationale.


hint: Here is the example of the format of a 32-bit virtual address in lecture.
















    4. [15 pts] Consider a system with following specifications: Both virtual address space and physical address are 32bits. Page table entry size of 4Bytes
(a) Suppose it uses 1-level page table, the format of the translation scheme is





What is the page size? What is the maximum page table size?

(b) Suppose it uses 2-level page table, the format of the translation scheme is




Please write down the 1-st level page number and its offset in decimal(base 10) of virtual address 0xC302C302(base 16).


Please write down the 2-nd level page number and its offset in decimal(base 10) of virtual address 0xEC6666AB (base16)



    5. [20 pts] Please realize merging free blocks in default_free_pages()

In the lab code, there may exists the continuous free pages are divided into several blocks after released. Complete default_free_pages() to merge these continuous free pages in to a single node.




















There may exists free block(p) before or after the newly released free block(base) . To merge them, you should:

    a) Modify P's property

    b) clear base's property

    c) update the free_list

You can modify the check function in default_pmm.c to check your code.





to
Your report should include the screenshot of your code(with annotations) and the check result(run make qemu to see the result).



    6. [20 pts] Realize bestfit in best_fit_pmm.c .

You can modify pmm_manager() in default_pmm.c to check your code.












Your report should include the screenshot of your code(with annotations) and the check result(run make qemu to see the result).

More products