Computer Science-Pseudo file /proc/mem_map

Pseudo file /proc/mem_map

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

You can read some more information about mem_map at…
http://www.chudov.com/tmp/LinuxVM/html/understand/node28.html

Goals:
=====
* You will learn how the /proc entries are created
* Learn how to convert the virtual to physical and vice versa in Linux kernel
* Ability to look at and if necessary understand the struct page entries

Submission
=========
* Module code and associated Makefile
* 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.

Previous answers to this question


This is a preview of an assignment submitted on our website by a student. If you need help with this question or any assignment help, click on the order button below and get started. We guarantee authentic, quality, 100% plagiarism free work or your money back.

order uk best essays Get The Answer