Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use Unbuntu, linux, and virtual box to solve the problem below (this is an operating systems problem): Please show modification(file diff1.txt, diff2.txt,..) of linux

Please use Unbuntu, linux, and virtual box to solve the problem below (this is an operating systems problem):

image text in transcribed

image text in transcribed

image text in transcribed

Please show modification(file diff1.txt, diff2.txt,..) of linux kernel.

please use diff command to highlight your modification: $ diff -u original_file.c modified_file.c. > diff.txt

please show user-level test programs, the kernel folder, and the user folder show screenshots of all results

this problem requires Ubuntu, linux, and virtual box

Given the above virtual memory areas used by a process, write a system call sys getPageInfo to report the current status of specific addresses in these virtual memory areas. The system call takes the pid of a process as input and outputs the following information of start address vm_start in each vm_area_struct that the process has: 1. If the data in this address is in memory or on disk. 2. If the page which this address belongs to has been referenced or not. 3. If the page which this address belongs to is dirty or not. Using user-level programs (assignment-user1.c) to test your system call. Data structure: Linear address Offset within Offset within PAD Offset within PUD Offset within PMD Offset within PTE Offset within Data frame pte_offset Page frame with user data pud_offset where I Hints: The page descriptor (data struct pgd 1) contains information about the page. You need to figure out how to obtain a reference to the page descriptor given a virtual address and read to information from the page descriptor. To get current status of specific addresses, you need to test the corresponding flag bit of the address's page table entry (data struct pre 1). Note that Linux uses multi-level page tables, you might need multiple steps to reach the page table entry of a given virtual address. Bit PAGE_PRESENT PAGE ACCESSED PAGE DIRTY Table: Page Table Entry Status Bits Function Page is resident in memory and not swapped out. Set if the page is referenced. Set if the page is written to. The function pre present is used for judging a page is in memory or disk. If the return value is 1, the page is in the memory, otherwise it is in the disk. The function pte young is used for judging a page is referenced or not. If the return value is 1, the page has been referenced, otherwise it has not been referenced yet. The function pte dirty is used for judging a page is dirty or not. If the return value is 1, the page is dirty, otherwise it is not dirty. Given the above virtual memory areas used by a process, write a system call sys getPageInfo to report the current status of specific addresses in these virtual memory areas. The system call takes the pid of a process as input and outputs the following information of start address vm_start in each vm_area_struct that the process has: 1. If the data in this address is in memory or on disk. 2. If the page which this address belongs to has been referenced or not. 3. If the page which this address belongs to is dirty or not. Using user-level programs (assignment-user1.c) to test your system call. Data structure: Linear address Offset within Offset within PAD Offset within PUD Offset within PMD Offset within PTE Offset within Data frame pte_offset Page frame with user data pud_offset where I Hints: The page descriptor (data struct pgd 1) contains information about the page. You need to figure out how to obtain a reference to the page descriptor given a virtual address and read to information from the page descriptor. To get current status of specific addresses, you need to test the corresponding flag bit of the address's page table entry (data struct pre 1). Note that Linux uses multi-level page tables, you might need multiple steps to reach the page table entry of a given virtual address. Bit PAGE_PRESENT PAGE ACCESSED PAGE DIRTY Table: Page Table Entry Status Bits Function Page is resident in memory and not swapped out. Set if the page is referenced. Set if the page is written to. The function pre present is used for judging a page is in memory or disk. If the return value is 1, the page is in the memory, otherwise it is in the disk. The function pte young is used for judging a page is referenced or not. If the return value is 1, the page has been referenced, otherwise it has not been referenced yet. The function pte dirty is used for judging a page is dirty or not. If the return value is 1, the page is dirty, otherwise it is not dirty

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are the characteristics of modern science?

Answered: 1 week ago