Operating System Labs, Fall 2009
Student Originated Software
http://grace.evergreen.edu/sos/
Use Refresh on your browser to get the most recent update of class pages.
If not otherwise indicated, lab assignments are from the text
Operating System Projects, by Gary Nutt.
Use the following Lab Report Guidelines
for submitting your lab project work.
Lab 1 - C Programming Warmup, Due Tuesday Week 3
Lab 2 - Nutt Lab 2 - Shell, Due Tuesday Week 4
- Read Nutt pp1-50, 67-82.
- Complete the Nutt lab exercise 2 stated on pp77-82. You only need to
complete Part A; we will be doing a more complete shell covering parts
B and C later during the spring quarter Unix System Programming
and Concurrency.
- Code Samples
- Solutions (See the main OS page or the C support page)
Lab 3 - Nutt Lab 1 - Observing Linux Behavior, Due Tuesday Week 6
- Read Nutt pp1-50 (again) and pp51-65.
- Complete all parts of the Nutt lab.
- Code Samples
Lab 4 - Nutt Lab 3 - Kernel Timers, Due Tuesday Week 8
- Read Nutt pp1-50 (again) and pp83-95
- Complete all parts of the Nutt lab.
- Code Samples
- FAQ
- What Linux OS can I use? You can use any Linux OS that has the C development package installed so you can compile C programs using system calls. This will include the header files that are referred to in the man pages for the system calls you are using. Always use the man pages on the system that you are programming.
- Do I need the kernel source code? Not to do the programming, but the lab suggests you look at the some of the source code files. If you're just looking at source code files, then you can look on grace or the lab machines or any other linux system with source code because they will all be similar enough for just reading code.
- Where is the linux source code? Look on page 89 of Nutt to see the layout of the linux source code tree. It will be similar (but not exactly the same) on all linux systems. Take special note of where the include files are. Most of what you need is in include/linux/kernel or else include/asm for machine specific code.
Lab 5 - Nutt Lab 4 - Kernel Modules, Due Tuesday Week 10
Note For this lab you will need to have root access to your system and
be able to compile kernel modules.
- The Linux Documentation Project Guides
- The Linux Kernel Module Programming Guide
- Lab 5 Code Samples for Slackware 2.2VM in VirtualBox
- Read Nutt pp1-50 (again) and pp97-105
- Reproduce enough of the sample kernel module code discussed in the Linux Kernel Module Programming Guide (LKMPG) so you can successfully load and register a kernel module function. Note that the code depends on the kernel version you are using.
- Now build a kernel module function to supply a very simple proc file read. You should be able to find this example in the LKMPG also. Note that the code depends on the kernel version you are using.
- Finally, you are ready to build the kernel module described in the Nutt lab to implement a readable proc file clock.
- FAQ
- What Linux OS can I use? Now you need to use a version of linux that has the kernel source code and you need to have root access so you can compile kernel module code.
- Do I need the kernel source code? Yes. We have supplied a Slackware 2.2 kernel vdi file that can be used on any machine that runs Sun Microsystem's VirtualBox. This old version of linux best matches the Nutt lab book.
- Can I use a newer linux kernel? Yes, but you will need to do more research beyond the Nutt text to do your kernel coding. Fortunately for this kernel module code project the LKMPG has sample code that works for the 2.2, 2.4, and 2.6 kernels. Use the 2.4 guide when working with the 2.2 kernel - I believe it has some legacy code for use with the 2.2 kernel.
- Can I get the code samples in the Nutt book to work? Yes, but not
exactly as they are listed in the text. We have sample code to replace what
is in the Nutt text. We obtained our sample code from the LKMPG and experimentation.
Lab 6 - Nutt Lab 5 - System Calls
Note For this lab I recommend using the Slackware 2.4 kernel vdi
available in the kernel images handout directory.