Nachos Projects Overview and Project 1 TA : 吳哲榮 2010/10/21.

Slides:



Advertisements
Similar presentations
Introduction CSCI 444/544 Operating Systems Fall 2008.
Advertisements

Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
Operating System Tracing the Nachos code in Java Instructor: Dr. Lee, Hahn-Ming. ( 李漢銘 教授 ) TA (Reporter): Mao, Ching-Hao 毛敬豪 Chen, Wei-Da 陳威達 2006/3/14.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
CS-502 Fall 2006Project 1, Fork1 Programming Project 1 – Fork.
Operating System Tracing the nachos code in Java
Operating System - NachOS Project Introduction
Nachos Introduction CS Operating System 2007.
CS 162 Nachos Tutorial Image courtesy of Thomas Andersen:
Build an Operating System
Nachos Introduction CS Operating System 2005.
IntroductionCS-3013 C-term Programming Project #1 Forking Processes Due Thursday, January 24, 6:00 PM.
Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.
CMSC 104, Version 9/011 Introduction to C Topics Compilation Using the gcc Compiler The Anatomy of a C Program 104 C Programming Standards and Indentation.
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
Operating System Program 5 I/O System DMA Device Driver.
CS162B: Assembly and C Jacob T. Chan. Objectives ▪ System calls ▪ Relation of System calls to Assembly and C ▪ Special System Calls (exit, write, print,
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
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.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Nachos Project 1 Start-up and System call
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
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.
Nachos Projects Overview and Project 1 TA : 王映智 2007/10/24.
CS 444 Introduction to Operating Systems
Nachos Project Assignment 1 MultiprogrammingTA:mamafun.
Operating Systems Lecture 7 OS Potpourri Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software.
Race Conditions Defined 1. Every data structure defines invariant conditions. defines the space of possible legal states of the structure defines what.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
Nachos Project Assignment 2 CPU scheduling
Nachos Overview 2011 级 OS 课程设计 2013 秋. to get your hands dirty Read and analyze Build observe.
Issues Autonomic operation (fault tolerance) Minimize interference to applications Hardware support for new operating systems Resource management (global.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
Nachos Tutorial 马 融 03-ACM Honor Class Dept. of Computer Science and Engineering Shanghai Jiao Tong University 2007 / 11.
MIPS Project -- Simics Yang Diyi Outline Introduction to Simics Simics Installation – Linux – Windows Guide to Labs – General idea Score Policy.
1. Introduction to Nachos Shandong University 2014 秋.
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.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Nachos Overview and Project 1. Nachos Introduction Official website
1 Lecture 6 “Nachos” n nachos overview n directory structure n nachos emulated machine n nachos OS n nachos scheduler n nachos threads.
Operating Systems CMPSC 473 Introduction and Overview August 24, Lecture 1 Instructor: Bhuvan Urgaonkar.
Wouter Verkerke, NIKHEF 1 Using ‘stoomboot’ for NIKHEF-ATLAS batch computing What is ‘stoomboot’ – Hardware –16 machines, each 2x quad-core Pentium = 128.
Virtualization Neependra Khare
CMPS Operating Systems Prof. Scott Brandt Computer Science Department University of California, Santa Cruz.
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 20, 2016.
Nachos Project Assignment 3 Memory Management
Outline Installing Gem5 SPEC2006 for Gem5 Configuring Gem5.
Virtual Machine Monitors
Bare metal OS project CSSE 332 Operating Systems
CASE STUDY 1: Linux and Android
Introduction to SimpleScalar
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 19, 2017.
Introduction to Operating Systems
OS Virtualization.
Introduction to Operating Systems
More examples How many processes does this piece of code create?
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 21, 2018.
Lecture Topics: 11/1 General Operating System Concepts Processes
Programming Project #1 Command Shell
Programming Project #1 Fork and Command Shell
Computer System Laboratory
CSE 153 Design of Operating Systems Winter 2019
Nachos Project Assignment 2 CPU scheduling
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

Nachos Projects Overview and Project 1 TA : 吳哲榮 2010/10/21

Outline What’s Nachos? Why do we use Nachos? Nachos Project Overview Nachos installation Nachos Assignment 1 Reference

What ’ s Nachos? Nachos  Not Another Completely Heuristic Operating System Developed by Tom Anderson and his students at UC, Berkeley. 

What ’ s Nachos? Nachos is an instrumental software that allows students to study and modify a “real” operating system. The only difference between Nachos and a real operating system is that Nachos runs a Unix process, whereas a real operating system runs on a real machine.

What ’ s Nachos? Nachos simulates a MIPS machine (MIPS R2/3000) on the host system (Unix, Linux, etc.) Conceptually, Nachos has two modes of execution, namely, MIPS simulator and Nachos “kernel” Reference : nachos.ps

Why do we use Nachos? For understanding operating system concepts, nothing is better than building an operating system. Nachos is simpler than UNIX. Simulator makes debugging easier.  Deterministic

Nachos Project Overview The project for this course is to build an operating system for scratch. The project contains four phases, corresponding to each of the major pieces of a modern OS.  Multiprogramming  Thread management  File Systems and Virtual Memory  Networking

Nachos Installation Platforms you may use  Unix, Linux, Linux over VMware, or Cygwin. Environment  Checking g++ version g++ -v  Both g or g are ok.  If your current gcc version is 4.x.x version, you should install the gcc version. The gcc version is the watershed.

Nachos Installation Download the gcc source code. The following command is the installing flow. # wget gcc tar.gz # tar zxvf gcc tar.gz # mkdir gcc-build # cd gcc-build/ #../gcc-3.3.3/configure --prefix=/usr/local/gcc enable-threads=posix --disable- checking --enable--long-long --host=i386-redhat-linux --with-system-zlib --enable- languages=c,c++,java # make # make install # export PATH=/usr/local/gcc-3.3.3/bin/:$PATH Add the new gcc path to the current command searching path. # export LD_LIBRARY_PATH=/usr/local/gcc-3.3.3/lib/:$LD_LIBRARY_PATH Add the related library to the current library searching path.

Nachos Installation Get Nachos-4.0  tar.gz tar.gz Get Cross Compiler  decstation.linux-xgcc.tgz Move Cross Compiler to / mv./mips-decstation.linux-xgcc.tgz / Untar Cross Compiler cd / tar zxvf mips-decstation.linux-xgcc.tgz

Nachos Installation Untar Nachos tar zxvf nachos-4.0.tar.gz Make Nachos-4.0 cd./nachos-4.0/code make Test cd./userprog./nachos –e../test/test1./nachos –e../test/test2

Nachos Installation You should see the result of test1

Nachos Installation You should see the result of test2

Some Important Things Nachos arguments  Help./nachos –h  Debugging Mode./nachos –s  Execute files./nachos –e [file_name] Recompilation of modified nachos code cd nachos-4.0/code make clean (optional) make

Nachos Assignment 1 Abstract  The assignment is to support multiprogramming. We give some of the code you need, and you have to complete the system. Try execute two programs at the same time on Nachos cd./userprog./nachos –e../test/test1 –e../test/test2 you should see the following result.

Result of simultaneously execution Total threads number is 2 Thread../test/test1 is executing. Thread../test/test2 is executing. Print integer:9 Print integer:8 Print integer:7 Print integer:20 Print integer:21 Print integer:22 Print integer:23 Print integer:24 Print integer:6 Print integer:7 Print integer:8 Print integer:9 Print integer:10 Print integer:12 Print integer:13 Print integer:14 Print integer:15 Print integer:16 Print integer:17

Result of simultaneously execution Print integer:18 Print integer:19 Print integer:20 Print integer:17 Print integer:18 Print integer:19 Print integer:20 Print integer:21 Print integer:23 Print integer:24 Print integer:25 return value:0 Print integer:26 return value:0 No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting! Ticks: total 800, idle 67, system 120, user 613 Disk I/O: reads 0, writes 0 Console I/O: reads 0, writes 0 Paging: faults 0 Network I/O: packets received 0, sent 0 Why the output result of executing two program simultaneously differs from the result of executing two programs separately?

Why should you do? Trace Nachos  Read *.h and *.cc to understand the whole system and see how it is implemented.  You might use some documentations to help yourself understand the system. A Road Map Through Nachos  Trace for NachoOS-4.0 with GLOBAL 

Hints To know why the result is wrong, you may trace the following files.  nachos-4.0/code/userprog/addrspace.h  nachos-4.0/code/userprog/addrspace.cc  nachos-4.0/code/userprog/userkernel.cc  nachos-4.0/code/machine/translate.h  nachos-4.0/code/machine/translate.cc

Hints You have to modify the Nachos code to achieve the correct result. You may try to modify the following functions  nachos-4.0/code/userprog/addrspace.cc constructor destructor initRegister Load

Assignment Requirements 2 person per team Assignment Report (11/18 on the class)  Prepare a presentation about the following topics: Why the result is not congruent with expected How you modified Nachos to make it support multiprogramming – important code segments Everything you consider important

Hand in your reports. Please compress the following in a.zip.  modified source code(s) with path  presentation power-point  final report your.zip (project1_b _b zip) to TA. Deadline: 2010/11/18 23:59

Grading Policy Progress Report20% Correct Result30% Report50%

Reference Author’s Web Page  Thomas Narten's Nachos Roadmap 