Task:
As with previous projects, your work should compile/execute on cardiac. You are free to work on this project on a different machine, but you must test your code on cardiac.
You need to turn in your work (i.e., code, binary, makefile, script, notes, etc) in the directory as follows:
You should make a tarball for the entire project and turn in the tarball with a descriptive name. E.g., $ tar âcJvf cs370_proj4_MyName.tar.xz ./proj4/
A special 'drop box' directory has been set up on cardiac. You can now just copy your work (i.e., tarball file) into that directory from shell command prompt.
The directory is located at /home/cs370-1003/ (This directory is write-only â you only have write permission).
After you create your tarball file for your project, you can just copy the tarball file into the directory as shown below:
(Make sure you have your full name as part of your tarball file name.)
You then need to log in to WebCampus and submit a note there, which should contain:
 The name of the file you submitted
 The late-days you have used in this project and the remaining late-days
 Special instruction, if any, that I should know to compile/run your program
You may add any additional information to the note regarding your project.
It's important for you to submit the note on WebCampus as this will allow WebCampus to record that you have submitted your project.
In case you need to update your submission, you can just overwrite the old file in the directory. If you don't remember old file name, thatâs OK, I'll use the latest one that's submitted before the deadline. Just make sure you have your name as part of the tarball file name. Also note that both tarball on cardiac and the note on WebCampus should be submitted before the deadline. The timestamp of tarball file on cardiac should be before the deadline (or within extended deadline if you're using late days). I'll be a bit reasonable for the note on WebCampus, so I'll tolerate a few minutes late for the note.
1. Problem
Purpose: to understand virtual address space management and memory mapped file. Description: Your task is to implement a string matching program called âmfindâ using memory mapped file in Linux. You need to use mmap() instead of read() to implement the program.
The mfind is a command line program that accepts two arguments:
mfind mfind then searches the content of the file specified by for the string specified by . String is just a simple string (it is not a matching pattern such as regular expression). If string is found, the program prints out:
string found at offset where is the string that youâre looking for and is the location of the first character of the first instance of the matching string in the file. The program searches the string from the start of the file, and it only finds the first match, report the above string, and then terminates. If string is not found, the program prints out: string not found in file and then terminates.