Project 3 Principles of Operating Systems CMSC 421 — Spring 2021 Project 3 Preliminary Design and First Commit Due By: 11:59 PM EDT on Wednesday, April 7th Project Code and Final Design Due By:...

The project file is attached. The code needs to be done in C++. And it has to run correctly on Debian (Linux). I want the extra credit done too.


Project 3 Principles of Operating Systems CMSC 421 — Spring 2021 Project 3 Preliminary Design and First Commit Due By: 11:59 PM EDT on Wednesday, April 7th Project Code and Final Design Due By: 11:59PM EDT on Sunday, April 25th Changelog: April 4th: Added note about win/lose conditions on CPU moves and sample program to use the driver. April 2nd: Setup clarifications due to several questions March 29th: Typographical fixes + efficiency note March 29th: Initial Version Introduction/Objectives In this project, you will be creating a virtual device driver in the form of Linux a loadable kernel module. Your loadable kernel modules will implement a virtual character device to perform a specific task. The Linux kernel source code contains the code for several different character device drivers that you may reference in developing your driver for this project, such as those for /dev/rtc, /dev/urandom, etc. Before you begin, you must create your repository for Project 3 by using the appropriate link on Piazza for your section of the class. As this project will be building what is called an "out-of-tree" Linux device driver, you will not be cloning the full Linux source code into your repository as you did for Project 2. You will only have to compile your kernel once during the development of this project — to get a fully clean copy of the 5.5.0 Linux kernel to use as a basis for development. Included below are instructions on how to prepare for this project using your vanilla-project2 directory. You must complete this project in the VM that you set up earlier in the semester! Initial Setup You will need to compile the kernel exactly one time to complete this project. If you still have your vanilla-project2 around unmodified from the beginning of Project 2, you may use that to build the one kernel you will need for this assignment. If you do not have an unmodified vanilla-project2 directory still, please re-create it following the instructions in Project 2, but do not change the origin of the repository or copy it to a project2 directory. Before you get started, reboot your VM and select the Advanced option on the boot menu to pick the default Debian 4.19.0 kernel (use whichever is the newest version of it, but make sure to select the option that doesn't say anything about fallback or recovery). Then, uninstall any still installed project kernels you may have from Project 0 or Project 2 with the following two commands (type these commands very carefully!): sudo apt-get purge linux-image-5.5.0\* sudo apt-get purge linux-headers-5.5.0\* Ignore any errors from the second command about packages not existing. It is likely that you haven't ever installed a headers package for your projects unless you were using the VirtualBox Guest Additions. Now, go to your vanilla-project2 directory and follow steps 1-4 of building the kernel that you did for both Project 0 and Project 2. However, instead of running make bindeb-pkg, you must run make deb-pkg to ensure that you get a proper linux-headers package, linux-libc-dev package, and a linux-image package. To clarify, you are only performing the build instructions starting with make mrproper, you have no need to reinstall packages, set up sudo or git configurations, or anything else like that. You are not to change anything about the kernel code itself for this project. You are not to change the version string or any other kernel source code! Once the build has finished, install the resulting linux-image-5.5.0, linux-headers-5.5.0, and linux-libc-dev packages with sudo dpkg and reboot your VM. You should now be booted into a clean copy of the 5.5.0 kernel by default. You may now clone your repository for Project 3 by running the following set of commands (putting your GitHub username in where appropriate): cd /usr/src git clone [email protected]:umbc-cmsc421-sp2021/project3-YourGitHubUsernameGoesHere project3 Incremental Development One of the nice things about using GitHub for submitting assignments is that it lends itself nicely to an incremental development process. As they say, Rome wasn't built in a day — nor is most software. Part of our goal in using GitHub for assignment submission is to give all of the students in the class experience with using a source control system for incremental development. You are required in this project to plan out an incremental development process for yourself — one that works for you. There is no one-size-fits-all approach here. If in doubt as to whether a particular approach is feasible, you are encouraged to reach out to your TAs to ask their opinion. You should not attempt to complete this entire project in one sitting. Also, we don't want you all waiting until the last minute to even start on the assignment. Students doing either of these tend to get poor grades on their assignments. To this end, we are requiring you to make at least four non-trivial commits to your GitHub repository for the assignment. These four commits must be made on different dates and at least one must be done before Wednesday, April 7th at 11:59:00 PM EDT. You may make more than four commits during the timeline of the project — four is simply a minimum number required for full credit. A non-trivial commit is defined for this assignment as one that meets all of these requirements: ● Does not contain only documentation (i.e, just committing a README file does not count). However, you may have a single commit count for significant work on your preliminary design document, as specified below. ● Does not contain only Makefile modifications or creation. ● Modifies/creates at least 10 lines of code in a combination of existing or newly created .c or .h files. That is to say, creating a new file with 10 lines of code counts, but creating a new file with a 10 line comment does not. ● Code modifications/creation must be relevant to the project. Creating a bunch of useless files/functions that are unrelated or otherwise superfluous to the assignment does not count. It is ok to reorganize your code after you have started and remove pieces of code, of course, but if you are obviously only adding code to the repository early on that you completely delete later (or that has nothing to do with the assignment), then that commit will not count toward the requirements herein. ● Commits containing code implementing testing drivers or other such user-space code do count. Failure to adhere to these requirements will result in a significant reduction in your score for the assignment. This deduction will be applied after the rest of your score is calculated, much like a deduction for turning in the assignment with a late penalty. Project Design (30% of Project 3 Grade) As a part of this project, you are required to produce two design documents explaining your choices for designing the code for this project. The first of these design documents is a preliminary one explaining how you intend to tackle the project. This document is expected to be less detailed than your final design document, but still detailed enough as to give the TAs some insight on your intended design for the project. The idea here is that you preliminary design document will be turned in early on during the project so that the TAs can critique it and suggest possible pitfalls in your approach. Elements that we expect to see in a preliminary design document include the following: ● A basic description of the project itself and what you are expected to produce. ● A brief description of what a character device is in the Linux kernel, how they interact with user-space, and the required functions to implement (you will need to do a little bit of research on your own here). ● Ideas for how to implement the required algorithms that will be used to accomplish your device driver's task. ● Ideas of how to store the data required to accomplish your driver's task. ● A rough estimate of how many lines of code it will take to implement the driver, divided up by various functions you will be required to implement. ● Any references you have cited in preparing the design document. We are not specifying any specific template for the preliminary design document beyond these requirements for what it must contain. You may use whatever widely accepted citation style that you would like (APA, MLA, etc). We do however expect your document to be of a sufficient length to explain the requirements we have outlined above. To this end, we require that your document be at least 2 full double-spaced pages with a standard 12 point font (Helvetica, Times, Arial, or Times New Roman are the only acceptable font choices without approval from the TAs ahead of time), with no larger than 1 inch margins on normal letter (8.5 inch x 11 inch) sized pages. You may include diagrams as needed (hand-drawn or computer-generated), but these do not count toward your required page count). Additionally, title pages, tables of contents, etc do not count toward the required page count. Please see the top of the project for the due date of the preliminary design document! Your preliminary design document must be placed in the root of your GitHub repository and MUST be a PDF file named preliminary.pdf. Your final design document will essentially be a more fully specified version of the preliminary design document. You are expected to complete your final design document as you are completing or after you have completed the code, so it should be reflective of the actual state of what you turn in for the assignment. In addition to the requirements outlined above for the preliminary design document, you should include a section explaining how your final design changed from the preliminary design and why you made those changes. Also, your final design document should explain any places where you ran into issues developing your project and any shortcomings it might have. Finally, if you have completed any of the extra credit on the project, you must document it in your final design document, or no credit will be given for it. Be sure to explain the implementation details of your extra credit if you attempt any of it! As your final design will be more detailed, we expect it to be of a more significant length as well. Your final design document must be at least 4 full double-spaced pages, following all of the other formatting requirements outlined above for the preliminary design. Your final design document must be placed in the root of your GitHub repository and MUST be a PDF file named design.pdf. We expect that the design document would be sufficient for a relatively proficient kernel programmer (who knows how to play Reversi) to recreate your kernel module without consulting with your code, especially in the areas of how you checked the validity of moves, determined which moves the CPU would make, how you checked if a player must pass on a given turn, and how you checked if the game was over and determined
Apr 09, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here