Next: The Assignment
Up: No Title
Previous: No Title
For this lab, you will be working mostly in the userprog
directory. Read and understand the part of the
system that is provided to you. As in the last lab, you will test your
implementation by running user programs on Nachos. At
present, Nachos can run a single user-level `C' program at a time.
The files for this assignment are listed below. You will need to
understand all of these files for the fourth lab as well.
- progtest.cc -
- test routines for running user programs.
- addrspace.h, addrspace.cc -
- create an address space in which
to run a user program, and load the program from disk.
- syscall.h -
- the system call interface: kernel procedures that
user programs can invoke.
- exception.cc -
- the handler for system calls and other
user-level exceptions, such as page faults. In the code we supply,
only the `halt' system call is supported.
- filesys.h, openfile.h
- - (found in the filesys directory) a
stub defining the Nachos file system routines. For this
assignment, we have implemented the Nachos file system by directly
making the corresponding calls to the UNIX file system.
- translate.h, translate.cc -
- translation table routines. In
the code we supply, every virtual address is the same as its physical
address - this memory management scheme means you may only execute
one user program at a time.
- machine.h, machine.cc -
- emulates the part of the machine that
executes user programs: main memory, processor registers, etc.
- mipssim.cc -
- emulates the integer instruction set of a
MIPS R2/3000 processor.
- console.h, console.cc -
- emulates a terminal device using UNIX
files. A terminal is (i) byte oriented, (ii) incoming bytes can be
read and written at the same time, and (iii) bytes arrive
asynchronously (as a result of user keystrokes), without being
explicitly requested.