DOC PREVIEW
Berkeley COMPSCI 162 - Nachos Tutorial and Source Code

This preview shows page 1-2-3-4-5-6-7-8-9-10-11-12-83-84-85-86-87-88-89-90-91-92-93-94-167-168-169-170-171-172-173-174-175-176-177-178 out of 178 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 178 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

0 1 2 2 33 1 0 2 4 0 9 55 0 9 4 2 4 6 4 4 4 55 4 6 7 4 8 4 9 4 0 0 2 0 0 2 0 2 0 2 0 9 6 2 2 A 0 B C 0 0 0 D 0 C E 1 2 6 0 GFF 1 0 0 0 F 0 0 0 0 0 0 6 7 4 2 9 0 6 0 9 0 0 H 7 8 4 55 7 D 2 C C 0 B 0 0 0 0 0 A 2 C 8 0 C 0 1 C 0 C 9 3 C 9 4 I 8 1 3 C C 8 C 2 1 3 6 J2 K 2 6 2 6 2 6 2 6 1 H 0 3 2 8 0 2 2 2 2 2 H H 2 GL C 8 GL 0 FL FL GL 2 GL A 9 2 FL 3 GL 2 E FL GL D 2 H FL D9 FL 2 3 0 FL D 2 MGL GL D 7 0 2 8 D 1 8 2 A 8 C 3 A 3 6 2 B 1 6 2 09 02 06 19 43 58 1 nachos README Nachos for Java README Welcome to Nachos for Java We believe that working in Java rather than C will greatly simplify the development process by preventing bugs arising from memory management errors and improving debugging support Getting Nachos Download nachos java tar gz from the Projects section of the class homepage at Compiling Nachos You should now have a directory called nachos containing a Makefile this README and a number of subdirectories First put the nachos bin directory on your PATH This directory contains the script nachos which simply runs the Nachos code To compile Nachos go to the subdirectory for the project you wish to compile I will assume proj1 for Project 1 in my examples and run http www inst EECS Berkeley EDU cs162 gmake Unpack it with these commands gunzip c nachos java tar gz tar xf This will compile those portions of Nachos which are relevant to the project and place the compiled class files in the proj1 nachos directory Additional software You can now test Nachos from the proj1 directory with Nachos requires the Java Devlopment Kit version 1 5 or later This is installed on all instructional machines in usr sww lang jdk 1 5 0 05 To use this version of the JDK be sure that usr sww lang jdk 1 5 0 05 bin is on your PATH This should be the case for all class accounts already If you are working at home you will need to download the JDK It is available from http java sun com j2se 1 5 Please DO NOT DOWNLOAD the JDK into your class account Use the preinstalled version instead The build process for Nachos relies on GNU make If you are running on one of the instructional machines be sure you run gmake as make does not support all the features used If you are running Linux the two are equivalent If you are running Windows you will need to download and install a port The most popular is the Cygnus toolkit available at http sources redhat com cygwin mirrors html The Cygnus package includes ports of most common GNU utilities to Windows For project 2 you will need a MIPS cross compiler which is a specially compiled GCC which will run on one architecture e g Sparc and produce files for the MIPS processor These compilers are already installed on the instructional machines and are available in the directory specified by the ARCHDIR environment variable nachos You should see output resembling the following nachos 5 0j initializing config interrupt timer elevators user check grader thread 0 looped 0 times thread 1 looped 0 times thread 0 looped 1 times thread 1 looped 1 times thread 0 looped 2 times thread 1 looped 2 times thread 0 looped 3 times thread 1 looped 3 times thread 0 looped 4 times thread 1 looped 4 times Machine halting Ticks total 24750 kernel 24750 user 0 Disk I O reads 0 writes 0 Console I O reads 0 writes 0 Paging page faults 0 TLB misses 0 Network I O received 0 sent 0 This is the correct output for the bare bones Nachos without any of the features you will add during the projects If you are working on a project which runs user programs projects 2 4 you will also need to compile the MIPS test programs with gmake test Command Line Arguments If you are working at home you will need to get a cross compiler for yourself Cross compilers for Linux and Win32 will be available from the CS162 Projects web page Download the cross compiler distribution and unpack it with the following command gunzip c mips x86 linux xgcc tar gz tar xf Substitute the appropriate file name for mips x86 linux xgcc in the above command You need to add the mips x86 linux xgcc directory to your PATH and set an environment variable ARCHDIR to point to this directory Again this has already been done for you on the instructional machines For a summary of the command line arguments run nachos h The commands are d debug flags Enable some debug flags e g d ti h Print this help message 09 02 06 19 43 58 nachos README s seed Specify the seed for the random number generator x program Specify a program that UserKernel run should execute instead of the value of the configuration variable Kernel shellProgram z print the copyright message grader class Specify an autograder class to use instead of nachos ag AutoGrader grader arguments Specify the argument string to pass to the autograder config file Specifiy a config file to use instead of nachos conf Nachos offers the following debug flags c i p m M t a COFF loader info HW interrupt controller info processor info disassembly more disassembly thread info process info formerly address space hence a ElevatorBank allowElevatorGUI Normally true When we grade this will be false to prevent malicious students from running a GUI during grading NachosSecurityManager fullySecure Normally false When we grade this will be true to enable additional security checks Kernel kernel Specifies what kernel class to dynmically load For proj1 this is nachos threads ThreadedKernel For proj2 this should be nachos userprog UserKernel For proj3 nachos vm VMKernel For proj4 nachos network NetKernel Processor usingTLB Specifies whether the MIPS processor provides a page table interface or a TLB interface In page table mode proj2 the processor accesses an arbitrarily large kernel data structure to do address translation In TLB mode proj3 and proj4 the processor maintains a small TLB 4 entries Processor numPhysPages The number of pages of physical memory Each page is 1K This is normally 64 but we can lower it in proj3 to see whether projects thrash or crash Documentation The JDK provides a command to create a set of HTML pages showing all classes and methods …


View Full Document

Berkeley COMPSCI 162 - Nachos Tutorial and Source Code

Documents in this Course
Lecture 1

Lecture 1

12 pages

Nachos

Nachos

41 pages

Security

Security

39 pages

Load more
Download Nachos Tutorial and Source Code
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Nachos Tutorial and Source Code and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Nachos Tutorial and Source Code 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?