CMSC 412 Programming Assignment #0

Due February 4, 2002 (10: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 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 OIT cluster (see  www.cs.umd.edu/~hollings/cs412/s02/oitInfo.html for more information).  Your account is:

            name:  «name»

user:  «Account»

            password: «Password»

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).

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 in before the definition of this function in kthread.c