Operating Systems Project 4


The goals of this project are:
  1. to familiarize yourselves with device management and disk mounting in Unix-like systems
  2. to familiarize yourselves with the Minix block drivers
  3. to familiarize yourselves with the Minix RAM disk driver

As before, this is an individual or group project.

Description

I want you to add a new ram disk device to your Minix system. This should be a disk of size 4,194,304 bytes (4MB, 4 * 1024 * 1024 bytes). This assumes you have much more than 4MB of memory in your system.

The project consists in creating such a device and making it work. It should be possible to mount(1) your device, which should be called /dev/mydisk -- you may or may not need to create this device with mknod(8) once you have completed your changes to memory.c. To convince yourself that your disk works, you should copy one or more source files to it and compile them, then execute the code.

Because the project is relatively simple, this project description gives few details. You are expected to figure out the details yourself. This includes, where appropriate, consulting with the instructor and using the mailing list to consult with your colleagues.

Turning in the project

The project should be sent in by email. Please send me the following:

  1. a brief description of the status (success or lack thereof) of your project. If you think you have succeeded, include the entire output of df(1), showing all the disk devices on your system including your new device.
  2. a complete copy of your memory.c file. Most of your changes should be to this file.
  3. any other information that is needed to reproduce what you did.
Although you will need to define
#  define MY_DEV           6  /* minor device for /dev/mydisk */
in include/minix/dmap.h, there is no need to include this particular detail in the project submission.

The minix ramdisk

In case you want to experiment with the built-in minix3 ramdisk, the way to do it is as follows:
  1. ramdisk size, e.g., ramdisk 4096
  2. mkfs.mfs /dev/ram
  3. mount /dev/ram /mnt
  4. df or mount should show the new file system