$29.99
Part I
Modify the Minix3 source code such that the string “PID <pid> swapped in” is printed, whenever a user-level process is brought in by the scheduler.
To do this, you will need to understand how the scheduler works. These pages https://minixnitc.github.io/scheduling.html , http://www.minix3.org/docs/scheduling/report.pdf give a good explanation. You have to look at the code in : minix/servers/sched and minix/kernel/proc.c .
Part II
You can test by using the UnixBench benchmark suite as instructed below:
1. Get the source code from ftp://ftp.iitdh.ac.in/opensource/tools/byte-unixbench-mod.zip and copy it to your home folder in the Minix3 VM.
(Note that this is a modified version of the suite. The original benchmarks were designed as “fixed duration” benchmarks: they each repeat a certain pattern over and over until a timer expires. The modification was done to make some of the benchmarks (namely, arith, fstime, pipe, spawn, syscall) as “fixed work”: they do a certain fixed amount of work, regardless of the time it takes to do that work.).
2. Run the command “gmake” to build the benchmarks in the Minix3 VM.
Submit: a single zip file (format: <roll-number-1>_<roll-number-2>_lab3.zip) with all modified source C files and a shell script. The shell script must copy the modified source files to the correct directories, and build the system. The evaluator will simply run the shell script, reboot the system, and check for the desired behavior. The zip must also contain a report of your study of the Unixbench suite.
Tip: print statements from the kernel and scheduler are also saved in /var/log/messages. Print statements from user programs can be simply redirected to a file for analysis.