ramdisk module
Ramdisk Module
Due date: Dec. 11th, 23:59 In this final project, you will implement a simple ramdisk module that you can format with “mkfs.ext2” and mount and unmount with “mount” and “umount”. The ram disk should be of a fixed size stored entirely in memory. It should appear as a block device in the system. This project is an example of a block device driver, which handles data a block at a time. Your project should satisfy the following requirements. - Implement a ramdisk as a kernel module. - Allow an ext2 filesystem to be installed onto the ramdisk. - Allow the filesystem to be mounted and unmounted with “mount” and “unmount”. Tips: Here are some tips that may help. - This link (http://www.tldp.org/LDP/lkmpg/2.6/html/lkmpg.html) will help you get started writing a module. - This link (http://www.cs.uni.edu/~diesburg/courses/cop4610_fall10/week06/week6.pdf) is a little dated (for instance, the current kernel is at version 5.x and this link describes things for 2.6), but it will also help. - Chapter 16 of this book (https://lwn.net/Kernel/LDD3/) describes what you're trying to do. That chapter is outdated and the block device layer has changed significantly, but reading that chapter is a good starting point. - This article (https://lwn.net/Articles/58719/) describes some of the changes to the block layer. - This article (https://opensourceforu.com/2012/02/device-drivers-disk-on-ram-block-drivers/) has a more up-to-date example. Don't just copy and paste or use code that you don't understand. It's easy to spot projects that are blatantly ripped-off, even if you rename variables.