Operating Systems Project 2


The goals of this project are:
  1. to install a Minix you can use in future projects
  2. to customize the kernel
  3. to verify that you can print from the kernel (and therefore have at least rudimentary debugging capabilities)

This is an individual or group project, at your choice -- but it might be difficult to change that choice in future projects, so choose carefully. You may collaborate as described in the admin page. You may use any libraries that are part of the standard Minix distribution.

The project is due Thursday, February 1st 2007, any time. Submission is by email. Please send me the following:

  1. a brief statement that you have successfully installed minix on your target system, and that you are able to execute programs and recompile and reinstall the operating system. If you are not able to do so, a brief description of what you have been able to achieve.
  2. a brief description of your installation, including whether on a simulator (and if so, which one) or on what hardware, and if on actual hardware, whether you have a dedicated machine or a machine that multi-boots minix and other operating systems. Also (whether on real hardware or on a simulator), the size of your disk and the amount of memory available to the OS.
  3. a copy of the parts of the file exec.c modified as explained below (starting two lines before the first change and ending two lines after your last change). This may be sent inline or as an attachment.

Please send in your project on time -- late submissions will not be accepted, and I prefer to have partially-working projects rather than no project at all.

Installation

I expect that most of the effort in this project will go towards installing Minix.

You must select a target platform, whether a simulator or actual hardware (if you wish to install on actual hardware, the instructor still has one machine available). Simulators include Bochs or Plex86 and Vmware (the last two may be faster than bochs, but will only run on an x86 platform).

Follow the instructions in the Appendix A of the textbook (starting on p. 629) or at the Minix 3 download page (the setup guide). You follow these instructions, which include

  1. partitioning the hard disk -- note that minix cannot handle partitions larger than 128GB.
  2. booting minix from the CD (or the simulator equivalent)
  3. starting the setup script
After installing Minix, rebuild the entire operating ssytem. If you have a floppy drive you may use that, or you may use a pre-existing bootloader or the Minix bootloader.

You may have questions while doing this. The documentation, the web, the course mailing list, and the instructor (who can be reached at his office phone, 956-3891) often have some of the answers.

Testing your kernel hacking abilities

I want you to print the path of every file being executed. To do this, you have to modify file servers/pm/exec.c appropriately, then send me your changes (not the entire exec.c file, please) and the 2 lines before and after your changes (my own solution changes a single line, so I would send 5 lines total). I think you can use printf to print the file that is being executed -- still checking on this. For example, if a process executes /bin/ls, your code should print to the console "executing /bin/ls". This is just to confirm that you are executing the kernel you think you are executing (which is often a problem when first debugging kernels).

After making these changes, recompile and make sure your kernel is printing each command that is executed.

Finally, once you have verified that everything works, send me the changes to exec.c, then change them back so you have a "normal" operating system that you can use in future projects.