Docsity

Operating Systems - Assignment Study Guide | CMSI 387, Assignments of Operating Systems

Toggle sidebar
bg1
CMSI 387
OP E R A T I N G SY S T E M S
Spring 2007
Assignment 0125
This assignment is all about getting your hands dirty with building and deploying an operating system kernel.
Not for Submission
1. You’ll need the unified diff (unidiff) format for
this assignment — look it up, and learn how to
use diff to generate such a file. To round things
out, read about patch so that you can get an idea
of how I’ll be using your unidiff file.
2. Understanding the Linux Kernel may be of par-
ticular help for this assignment.
For Submission
Perform the kernel building and modification pro-
ject described at the end of SGG Chapter 2.
•To be uniform (and for your convenience), the
kernel source archive that you should use has
been downloaded for you. You’ll find it at
http://www.cs.lmu.edu/~dondi/os-images.
•Commit your work to CVS in the form of a
unidiff patch and a sample program.
NOTE: Remember that open source software
changes faster than textbooks do — accomplishing
this work is guaranteed to not be exactly as speci-
fied in the book. Note, however, that while the
specific steps (the “policy”) may change, the overall
process (the “mechanism”) does not. Enjoy!
User-Mode Linux (UML) Option
Testing your kernel via UML allows you to do your
work on a Keck lab workstation without having to
overwrite its own operating system.
•In addition to what was discussed in class, most
of the information that you’ll need is available on
the UML hom e pa ge, lo cat ed at
http://user-mode-linux.sourceforge.net.
•For your convenience, a bootable Debian 3.1
disk image has been downloaded for you; you
can boot UML directly off this file. You can ac-
cess it from any Keck lab workstation at
/afs/cs.lmu.edu/user/d/dondi/public_html/os-images/
Debian-3.1-x86-root_fs.
•IMPORTANT: When booting off this shared
disk image, you’ll need a mechanism for storing
your local changes. This is done using a copy-on-
write (COW) layer, which is a separate file that
you specify. Thus, your invocation of UML
should look something like this:
path/to/your/UML/linux devfs=mount mem=32M
ubda=/tmp/your-user-ID-uml-root,/afs/cs.lmu.edu/use
r/d/dondi/public_html/os-images/Debian-3.1-x86-root
_fs
This will boot UML within a virtual machine
with 32M of RAM and a disk consisting of the
shared Debian 3.1 disk image with a COW file at
/tmp/your-user-ID-uml-root to capture any changes
that you make to the virtual disk.
•You’ll need to get files into the virtual machine
(i.e., your test program that demonstrates the sys-
tem call that you added to the kernel). Of all the
available options, hostfs is the most convenient.
Make sure to add this option when configuring
the UML kernel.
Workstation Option
If you’d like to boot your kernel “for real” from a
real machine, you may borrow a “mule” worksta-
tion that you can wipe-and-install as needed. Talk
to Caskey if this is how you’d like to work.
How to Turn it In
Commit your work under /homework/cmsi387/
hellokernel, tagged as hw-0125. The deliverables
consist of the following two files:
1. A unidiff-format patch file that applies your
changes to the original kernel source tree,
named your-last-name-hellokernel.patch.
2. The source code to a sample program that
demonstrates your new system call. Of course,
this program should only work when compiled
against your modified kernel header files then
executed under your modified kernel.

Partial preview of the text

Download Operating Systems - Assignment Study Guide | CMSI 387 and more Assignments Operating Systems in PDF only on Docsity!

CMSI 387

O P E R A T I N G S Y S T E M S

Spring 2007

Assignment 0125

This assignment is all about getting your hands dirty with building and deploying an operating system kernel.

Not for Submission

  1. You’ll need the unified diff ( unidiff ) format for this assignment — look it up, and learn how to use diff to generate such a file. To round things out, read about patch so that you can get an idea of how I’ll be using your unidiff file.
  2. Understanding the Linux Kernel may be of par- ticular help for this assignment.

For Submission

Perform the kernel building and modification pro- ject described at the end of SGG Chapter 2.

  • To be uniform (and for your convenience), the kernel source archive that you should use has been downloaded for you. You’ll find it at http://www.cs.lmu.edu/~dondi/os-images.
  • Commit your work to CVS in the form of^ a unidiff patch and a sample program. NOTE: Remember that open source software changes faster than textbooks do — accomplishing this work is guaranteed to not be exactly as speci- fied in the book. Note, however, that while the specific steps (the “policy”) may change, the overall process (the “mechanism”) does not. Enjoy!

User-Mode Linux (UML) Option

Testing your kernel via UML allows you to do your work on a Keck lab workstation without having to overwrite its own operating system.

  • In addition to what was discussed in class, most of the information that you’ll need is available on the UML home page, located at http://user-mode-linux.sourceforge.net.
  • For your convenience, a bootable Debian 3. disk image has been downloaded for you; you can boot UML directly off this file. You can ac- cess it from any Keck lab workstation at /afs/cs.lmu.edu/user/d/dondi/public_html/os-images/ Debian-3.1-x86-root_fs. - IMPORTANT:^ When booting off this shared disk image, you’ll need a mechanism for storing your local changes. This is done using a copy-on- write (COW) layer, which is a separate file that you specify. Thus, your invocation of UML should look something like this: path/to/your/UML/linux devfs=mount mem=32M ubda=/tmp/your-user-ID-uml-root,/afs/cs.lmu.edu/use r/d/dondi/public_html/os-images/Debian-3.1-x86-root _fs This will boot UML within a virtual machine with 32M of RAM and a disk consisting of the shared Debian 3.1 disk image with a COW file at /tmp/your-user-ID-uml-root to capture any changes that you make to the virtual disk. - You’ll need to get files into the virtual machine (i.e., your test program that demonstrates the sys- tem call that you added to the kernel). Of all the available options, hostfs is the most convenient. Make sure to add this option when configuring the UML kernel.

Workstation Option

If you’d like to boot your kernel “for real” from a real machine, you may borrow a “mule” worksta- tion that you can wipe-and-install as needed. Talk to Caskey if this is how you’d like to work.

How to Turn it In

Commit your work under /homework/cmsi387/ hellokernel , tagged as hw-0125. The deliverables consist of the following two files:

  1. A unidiff-format patch file that applies your changes to the original kernel source tree, named your-last-name-hellokernel.patch.
  2. The source code to a sample program that demonstrates your new system call. Of course, this program should only work when compiled against your modified kernel header files then executed under your modified kernel.