CMSC 412 Programming Assignment #0

Due February 4, 2003 (9:00 AM)

Introduction

 

The rest of the projects will require heavy use of the BOCHS x86 simulator environment. The purpose of this assignment is to get you familiar with the development environment and simulator.

You should read the handout (on the class web page under project #0) that describes how to use the GNU C++ x86 cross development environment, how to compile C and assembler programs in it, and how to use the linker. In addition, you should download the geekOS kernel (it is in the project0.tar.gz file on the class web site).

The assignment is to write a simple kernel mode thread that prints a message and then prompts for keyboard input until the exit command is entered.

 

You should use the CSIC cluster (see http://www.csic.cs.umd.edu/linuxlab for information on how to login).  Your account information was handed out the first day of class.

The Assignment

Get the bochs simulator environment and the mini-kernel for geekos running in your account. You will then add code to the kernel to create a new kernel mode thread.  The kernel mode thread should print out “Hello from xxx” where xxx is your class account name.  It should then call the keyboard input routine Wait_For_Key repeatly (and echo each character entered) until the termination character (control-d) is entered.

Requirements

Submit the program using the submit command.  You should submit a tar file containing all of the code (even the code we provided and you did not modify) for your kernel.  Do not include the binaries, object code, or the bochs disk images in your tar file (i.e. do a gmake clean before submitting the files). You should create the tar file in the directory above the proj0 directory with the command “tar cvf proj0.tar proj0”.  Failure to correctly submit the program directory will result in points being deducted.

Hints

This project will not require much code to be written.  However, it will take quite a bit of time to get things setup and debugged.

 

To start a new kernel mode thread you use the Start_Kernel_Thread function.  Look at the comments before the definition of this function in kthread.c