Starting from:

$29

Project 3: Virtual Memory and Page Tables

 Operating Systems – Project 3: Virtual Memory and Page Tables Part A

You will do this project in groups of 2 students. You can do it individually as well if you wish.
In project 3, you will develop a Linux module that will access and use the page table information of a process. But first you need to learn how to write a Linux module. Therefore, this project will be done in 2 parts: A) learning module programming; B) writing a module that accesses and uses page table information for a given process. This is the assignment for the part A. Part B will be assigned later.
You can do the project in a Linux system installed on bare hardware or on a virtual machine. You will do the project in a machine or virtual machine that has 64bit Linux 16.04.01.
Part A: Learning Module Programming
1. Learning how to build a Linux kernel. [If you wish you can skip this step 1 if you succeed doing step 2 without doing this step 1]. First, learn how to compile (build) and run a new Linux kernel, so that you can get prepared to write a kernel module. Learn from Internet how to build and run a new kernel. Download source code of Linux kernel, build it (this may take a while – one hour or so – the first time you do it) and run it. You can do it on a virtual machine if you wish. If you are doing it directly on your machine, make sure you backup all your data first, so that if you mess up the file system and partitions on the disk, you can recover your data. Note that this part will be quite time consuming, but you will do it only once (until you get your new kernel running).
2. Learning how to write a module and develop a simple Hello World module. In this step you will learn how to develop and run (load/insert) a new kernel module. Compiling a module and loading/running it is very easy and fast (just a few seconds) after you have the right development environment set up. There is documentation available on the web about Linux kernel module programming. Search for “Linux kernel module programming”. Below are two good references to start with. They can be reached from the course website. Read this documentation. Do some simple exercises. Write a helo world program. You can write and test other simple modules as well.
- The Linux Kernel Module Programming Guide, http://www.tldp.org/LDP/lkmpg/2.6/html/index.html
- Linux Device Drivers, Third Edition, http://lwn.net/Kernel/LDD3/, (especially the Chapter 2: Building and Running Modules).
2
References:
1) The Linux Kernel Module Programming Guide, http://www.tldp.org/LDP/lkmpg/2.6/html/index.html
2) Linux Device Drivers, Third Edition, http://lwn.net/Kernel/LDD3/, (especially the Chapter 2: Building and Running Modules).
3) Linux Virtual Memory Manager: https://www.kernel.org/doc/gorman/pdf/understand.pdf

More products