CPSC 410 / CPSC 611 -- Operating Systems: Projects
CPSC 410 / CPSC 611 -- Operating Systems: Projects
This page contains information about the projects.
Presentations about the Project Environment
Topic |
Slides |
|
|
Introduction |
slides
The Boot Process
Compiling and Linking a Kernel
Issues when Building a Kernel in C++
|
Low-Level Programming |
slides
Exceptions
Interrupts
Simple Devices
|
Handing in Projects
You are to submit your projects through the department's turn-in
system. Proceed as follows:
- Log into http://csnet.cs.tamu.edu. (You
may need to establish a VPN connection first; not sure.)
- Follow the "My Courses" link.
- Select CPSC410 or CPSC611 from the given list of courses. you
will see the class information and buttons for turn-in.
- Use the buttons to upload your files.
- NOTE: Subsequent submissions overwrite your earlier
submissions for the same assignment!!
- If you have more than one file to submit, compress them into
one file using zip.
Grading Criteria:
- Code Compiles: 40% (This basically means that you get at least 40% for each machine problem)
- Feature Completeness and functional correctness: 20%
- Documentation : 10%
- Efficiency : 10%
- Report 20%
- Grand Total: 100%
Turn in suggestions for Machine Problems:
- Follow a consistent code formatting style. This will ensure that the TA spends most of his time in understanding the logic of your code rather than on the structure of your code.
- Handle error conditions well. Try your best to make sure that your code prints out relevant progress messages on the console, so that the TA can figure how far along your code progressed in case the code crashes.
- Pay attention to efficiency. Although the grading criteria includes only 10 points for it, efficiency is an important factor in real product code in the industry. It is best to cultivate this habit sooner rather than later. Thinking about efficiency will also help you in writing an better report (20 points) by reasoning for/against design decisions.
Points to remember throughout the development of solutions to the machine problems:
- Since we are developing OS level code, we can only use the library support available from within the
bare bones version of the code provided. For example, we cannot use
the standard IO library or the STL.
- Before submission, make sure to check that your code compiles using
the DJGPP compiler. To make sure that you have submitted the correct version of your code, download the submitted version from the submission page and recompile it on top of a clean version of the provided bare bones code. This will ensure that you will not lose out on any of the 40% for correct compilations. In the past we have seen students losing points becase of code compilation issues.
Mention "CSCE 410" in the subject while communicating with the TA. All
course related communication will be sent to your CS email
address. Please check it regularly or forward it to another email that
you check regularly.
Infrastructure for Machine Problems
Check with the class handouts
(slides)
for details about the infrastructure
needed for the machine problems (Bochs emulator, compiler,
etc.).
Feel free to check out the walkthrough for the infrastructure setup
that Jared Brandhorst kindly made available!
The following describes the installation of the project infrastructure
in a Windows environment. We have tested it on Windows XP and Windows
7. These instructions describe the installation of the software in the
CSE lab machines (for example in Reed McDonald 111J). They can be
followed with minor modifications for installation on any other
Windows machine (for example, replace the references
to the H: drive with the appropriate location).
- Compiler: We will be using the DJGPP GNU compiler
environment for Windows.
Djgpp is a complete 32-bit C/C++ development system for Intel 80386
(and higher) PCs running DOS.
Download from here.
Attention: Edit the PATHsystem variable to include H:\DJGPP\BIN at the beginning.
(If you are not an administrator, add it to the PATH variable in the
User Variables section,
or add a new PATH user environment variable that contains only
H:\DJGPP\BIN).
Similarly, add a new variable DJGPP set to H:\DJGPP\DJGPP.ENV.
- Virtual Disk Handler:There are a few options here.
- FileDisk: If you have administrator priviledge on
your machine it is easiest to install and use FileDisk.
FileDisk is a virtual disk driver for Windows NT/2000/XP that uses
one or more files to emulate physical disks.
A console application is included that let you dynamically mount
and unmount files.
An example of use for this driver is if you have made plans
spending the weekend writing an RAID driver for NT but find you
are short of disks.
FileDisk can also use CD-images.See how to use it here.
Download from here.
- WinImage: This virtual disk handler for disk image
files has the same (or very similar) funtionality to
the program FileDisk described in class, but is easier to
install and has a graphical user interface. The free license is only
temporary, after which you have to upgrade for a fee.
- PowerISO: The free version of this program is
sufficient for our purposes. This should be the prefered solution if
you don't have administrative priviledges. Install this program as
well in your H: disk.
- Virtual Machines: If you run your development
environment inside a virtual machine like VirtualBox or some VMWare
product, you may want to use a disk image handler that comes with
the virtual machine.
- Assembler: We will be using the
NASM assembler.
Download the current version from here.
Remember to add a path to nasm in the system environment variable PATH.
- System Emulator: We will be using the Bochs emulator.
Bochs is a highly portable open source IA-32 (x86) PC emulator
written in C++ that runs on most popular platforms.
It includes emulation of the Intel x86 CPU, common I/O devices,
and a custom BIOS.
Currently, Bochs can be compiled to emulate a 386, 486,
Pentium/PentiumII/PentiumIII/Pentium4 or x86-64 CPU including
optional MMX, SSEx and 3DNow! instructions.
Bochs is capable of running most Operating Systems inside the
emulation including Linux, DOS, Windows? 95/98 and Windows
NT/2000/XP or Windows Vista.
You can find more about Bochs
at here.
Download the latest version from here.
The suport files for the machine problems can be found in this zip file. This archive containes four
files:
- dev_kernel_grub.img: This file contains the image of
the boot "floppy disk". It contains the grub bootloader and a dummy kernel.
- BIOS-bochs-latest: This file contains the BIOS.
- VGABIOS-lpgl-latest: This file contains a basic VGA
BIOS.
- bochsrc.bxrc: This text file contains the configuration of
the emulated machine. If bochs is correctly installed,
double-clicking on this file should start the emulator.
Note: Depending on the particular installation of Bochs on
your system, you may need to specify the complete path of the image
file for your floopy disk in file bochs.bxrc for Bochs to
find the floppy "device". Edit the file bochsrc.bxrc and
modify the definition for floppy A to be the absolute path of the
.IMG file.
Machine Problem 1 (Due Date: Check CSNET)
This first machine problem is easy and should get you used to the
machine problem environment, such as the Bochs emulator, the
compilers, and so on.
The handout for MP1 is available here, and the source code that you need
to work with is contained in this ZIP file.
To set up the environment for this MP on your machine, create a
directory of your choice, copy and unzip the
MP1_Sources.ZIP to the new directory. This archive
contains also all the Bochs environment file needed to run the
kernel in the Bochs emulator. Alternatively, you can copy and
unzip the
file BaseBochsEnv.zip (see paragraph about Bochs
Environment above) to that directory as well.You are now ready
to go.
Machine Problem 2 (Due Date: Check CSNET)
In the second machine problem you start working on the virtual
memory management of your operating system. You will set up
the paging system and initialize the page table.
The code for this MP can be found here. You will receive the handout
associated with this MP by e-mail.
Machine Problem 3 (Due Date: Check CSNET)
In the third machine problem you will further develop the memory
manager developed in MP2 to have page tables in virtual memory.
In addition, you will write a simple virtual memory allocator and
link it up to the new/delete operators in C++. With dynamic memory
available, life
will be much simpler!
The code for this MP can be found here. You will receive the handout
associated with this MP by e-mail.
Machine Problem 4 (Due Date: Check CSNET)
In the fourth machine problem you will work with the low-level
threading system of your operating system. You will implement a
scheduler and work on the interaction between low-level threads
and your scheduler subsystem.
The code for this MP can be found here. You will receive the handout
associated with this MP by e-mail.
Machine Problem 5 (Due Date: Check CSNET)
In the fifth machine problem you improve a simple device
driver for a disk to support asynchronous operations and
(optionally) mirroring. In addition, you will implement a simple
file system on top of the disk device. The code for this MP can be found here.