Learn how to convert the virtual to physical and vice versa


Question: Creating a /proc entry

Create a pseudo file /proc/mem_map by using a separate Linux kernel module (not statically linked into the kernel. From here on, all the assignments are expected to be Linux Modules).

As you all know by now, mem_map is a global array that consists of all the struct page entries.

It should display the following information...

1. Virtual Address of mem_map global variable in the Linux kernel. In short, contents of the variable.

2. Physical Address of mem_map location. Convert the above virtual address to physical and print it

3. Print the number of struct page entries that are available as part of the mem_map

Goals: 1. You will learn how the /proc entries are created

2. Learn how to convert the virtual to physical and vice versa in Linux kernel

3. Ability to look at and if necessary understand the struct page entries

Submission: 1. Module code and associated Makefile

2. Readme.txt - Details of how to build, execute and what to expect

Notes: In some systems, mem_map variable is not exported or used. In such scenarios, please use pfn_to_page(0) in place of mem_map. Meaning and use of both are exactly same.

Request for Solution File

Ask an Expert for Answer!!
Operating System: Learn how to convert the virtual to physical and vice versa
Reference No:- TGS02817121

Expected delivery within 24 Hours