In this lab, you will write a kernel module to create a new software device, /dev/dice, which returns randomly selected rolls of a 6-sided die.

This lab will also give you practice with using a virtual machine - a kind of emulator for running an operating system inside another operating system.


  1. Set up your VM
  2. An example driver /dev/hello
  3. Your driver /dev/dice

Submission Instructions

Remove or comment out all debugging printk statements. Put your name at the top of each source file. Make a copy of your code somewhere.

Create a tar archive (tarchive?) containing the entire folder containing your kernel module’s source code (dice_dev.c) and Makefile.

We should be able to cd into it and make ARCH=i386 and see that it builds.

Now you can submit as usual.