Nachos Introduction CS342301 Operating System 2005.

Slides:



Advertisements
Similar presentations
Introduction to the Omega Server CSE Overview Intro to Omega Basic Unix Command Files Directories Printing C and C++ compilers GNU Debugger.
Advertisements

Zhang Hongyi CSCI2100B Data Structures Tutorial 2
ENEE150: Discussion 1 Section 0104 Please Sit Down at a Computer and Login!
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
MT311 Tutorial Li Tak Sing( 李德成 ). Uploading your work You need to upload your work for tutorials and assignments at the following site:
Operating System Tracing the Nachos code in Java Instructor: Dr. Lee, Hahn-Ming. ( 李漢銘 教授 ) TA (Reporter): Mao, Ching-Hao 毛敬豪 Chen, Wei-Da 陳威達 2006/3/14.
Operating System Tracing the nachos code in Java
Nachos Introduction CS Operating System 2007.
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
Writing Methods. Create the method Methods, like functions, do something They contain the code that performs the job Methods have two parts.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
The Unix Environment and Compiling. Getting Set Up Your programs will be compiled and tested on the Departmental server ‘linprog’ The linprog servers.
Introduction to UNIX/Linux Exercises Dan Stanzione.
Operating System Program 5 I/O System DMA Device Driver.
1 CS 240 Programming in C and UNIX Lecturer: Bob Wilson Office: S Phone:
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
1/2002JNM Edit, Assemble, Link & Debug. 1/2002JNM Files Created.
Welcome to the World of Nachos CPS 110 Spring 2004 Discussion Session 1.
1 Nachos Introduction Lecturer: Tei-Wei Kuo TA: Ya-Su Chen, Yuan-Hao chang Date: 2005/10/19.
Nachos Project 1 Start-up and System call
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
1 Agenda Administration Background Our first C program Working environment Exercise Memory and Variables.
Nachos Projects Overview and Project 1 TA : 吳哲榮 2010/10/21.
Nachos Assignment#1 System calls implementation. What are system calls? Enable you to interact with OS kernel. A switch from User Mode to Kernel Mode.
HTML Hyper Text Markup Language A simple introduction.
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures for Java William H. Ford William R. Topp Appendix E The EZJava.
Nachos Projects Overview and Project 1 TA : 王映智 2007/10/24.
1 ITI 1120 Lab # 1 An Introduction to the Lab Environment Contributors: G. Arbez, M. Eid, D. Inkpen, A. Williams, D. Amyot.
CS 444 Introduction to Operating Systems
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
CPSC 217 T03 Week I Part #1: Unix and HELLO WORLD Hubert (Sathaporn) Hu.
Nachos Project Assignment 1 MultiprogrammingTA:mamafun.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Nachos Overview 2011 级 OS 课程设计 2013 秋. to get your hands dirty Read and analyze Build observe.
Nachos Project 4 Lecturer: Hao-Hua Chu TA: Chun-Po Wang (Artoo) Date: 2008/10/25.
Nachos Tutorial Courtesy: University of Waterloo.
Creating Programs on UNIX This term you can create programs on UNIX or you can create programs using a C++ compiler on your PC. This set of slides steps.
1. Introduction to Nachos Shandong University 2014 秋.
CS140 Project 1: Threads Slides by Kiyoshi Shikuma.
Nachos Project Assignment 1 Multi-programming TA: Hung-Leng Chen.
Nachos Project Assignment 3
Nachos Overview Lecturer: Hao-Hua Chu TA: Chun-Po Wang (Artoo) Date: 2008/09/18 Material Provided by Yuan-Hao Chang, Yung-Feng Lu.
Nachos Lecture 2 Xiaorui Sun. Phase 2 You have got one machine (machine package) You have to implements the incomplete OS (userprog package) Run programs.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
Nachos Overview and Project 1. Nachos Introduction Official website
ENEE150: Discussion 1 Section 0104/0105 Please Sit Down at a Computer and Login!
Installing Applications in FreeBSD lctseng. Computer Center, CS, NCTU 2 Before we start  Permission issue root: the super user Like administrator in.
Install CB 1.8 on Ubuntu. Steps Followed Install Ubuntu (Ubuntu LTS) on Virtual machine – (VMware Workstation) (
1 COMP 3500 Introduction to Operating Systems Project 2 – An Introduction to OS/161 Overview Dr. Xiao Qin Auburn University
Review Why do we use protection levels? Why do we use constructors?
Nachos Project Assignment 3 Memory Management
How to Work on your METEO 473 codes from your PC at home
Chapter 2: System Structures
Creating Programs on UNIX
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Andy Wang Operating Systems COP 4610 / CGS 5765
How to Run a Java Program
Tutorial of Unix Command & shell scriptS 5027
1. Open Visual Studio 2008.
Andy Wang Operating Systems COP 4610 / CGS 5765
Andy Wang Operating Systems COP 4610 / CGS 5765
CSCE-221 Makefile Introduction
Computer System Laboratory
CSCE 206 Lab Structured Programming in C
Review of Previous Lesson
Presentation transcript:

Nachos Introduction CS Operating System 2005

What is Nachos? Nachos  Not Another Completely Heuristic Operating System  Developed by Tom Anderson and his students at UC Berkley  An educational system used to teach kernel design and implementation

Why Nachos? Real hardware is difficult to handle Real kernel is too complicated to maintain Nachos  Use a MIPS virtual machine  Provide some basic OS elements

Nachos structure The Nachos kernel runs inside a process The simulator runs alongside the kernel inside a process The user program runs inside the simulator Machine (hardware) OS kernel User programs Simulated Nachos hardware Nachos kernel Nachos user program System calls Nachos system call

How to install Nachos? Copy files to your home directory  cp /tmp/nachos/nachos_4.0.tar.gz./ Extract files  tar -zxvf nachos_4.0.tar.gz Change directory  cd nachos-4.0/code Make files  make  You can ignore the warning messages  This step takes some time…please be patient

How to execute Nachos? There are several different directories in Nachos. You need to execute in different directories for different homework  cd threads/./nachos  cd userprog/./nachos

How to write your program Coding directly on the course machine  ssh Free ssh tool on Windows: putty (or pputty)  Use vi to read and modify files  Use grep to search in files Coding in Windows environment  Your familiar editors AEdiX suite (free) / UltraEdit / VC++  Use ftp to download / upload files

How to debug your program Use the debug options of Nachos ./nachos –d +  Print all debug messages In case the output is too many to fit the screen ./nachos -d + 2>&1 > FileName

How to recompile your program completely If you want to recompile the whole programs completely  cd ~/nachos-4.0/code/ make clean make

Project 1: Multiprogramming Please execute the nachos under ~/nachos- 4.0/code/userprog directory  Nachos executes two programs: ~/nachos- 4.0/code/test/test1.c and test2.c  For some reasons, execute the two programs concurrently will cause some errors  Please modify the kernel code such that Nachos can execute the two programs concurrently  In this project, you don’t really need to make files under code directory, make file in userprog directory is okay cd ~/nachos-4.0/code/userprog make

Project 1: Multiprogramming (cont ’ ) Please trace the following code to figure out how Nachos decide which programs to execute  userprog/userkernel.cc  void UserProgKernel::Run() In this project, you can only modify the following code segments (you may not need to modify all of them):  Constructor of AddrSpace in userprog/addrspace.*  Destructor of AddrSpace in userprog/addrspace.*  AddrSpace::Load(char*) in userprog/addrspace.*  Destructor of UserProgKernel in userprog/userkernel.*  UserProgKernel::Initialize() in userprog/userkernel.* You may need to use “semaphore”, please refer:  thread/synch.*

How to submit your program Please make a new directory “hw1” in your home directory Please copy your addrspace.*, userkernel.* in this directory TA will run “build.sh” to compile your program You can copy build.sh from /tmp/nachos/build.sh to test if your program can compile and execute correctly

Some matters needing attention The source code has been modified by TA. Please don’t mix them with other versions Mail the school IDs and names of your group members (2~3 people) to TA  Please leave a copy of your codes in your own PC. Course machine is for coding and testing only. We do NOT guarantee the safety of your codes TA will provide you something you should know, but TA will NOT debug for you

Grading Correctness: 70% README file: 20% Programming style: 10%

Reference links Nachos official site  A road map through Nachos  main.html main.html A quick introduction to C++ written by Tom Anderson  mple/c++.ps mple/c++.ps