Nachos introduction Outline Nach OS Overview Nach OS
- Slides: 10
Nachos introduction
Outline Nach. OS Overview Nach. OS Install Assignment
Nachos Overview
Nach. OS An instructional operating system Includes many facets of a real OS: ◦ Threads ◦ Interrupts ◦ Virtual Memory ◦ I/O driven by interrupts You it can (and will) modify and extend
Nach. OS Nachos also contains some hardware simulation. ◦ MIPS processor Can handle MIPS code in standard COFF, except for floating point instructions You can (and will) write code in C, compile it to MIPS and run it on Nachos. ◦ ◦ Memory Console Network interface Timer
Nach. OS Structure
Nach. OS Install
Nach. OS Install Environment Red Hat 9. 0 ◦ ftp: //red: hat@140. 118. 155. 12: 1433 VMware + Red Hat 9. 0 Or use other distributions with gcc 3. 3. 2
Nach. OS Install #download Nach. OS wget http: //neuron. csie. ntust. edu. tw/homework/97/OS/materials/nachos-4. 0. tar. gz #unzip Nach. OS tar -zxvf nachos-4. 0. tar. gz #download cross-compiler wget http: //neuron. csie. ntust. edu. tw/homework/97/OS/materials/mips-decstation. linuxxgcc. gz #move cross-compiler to root directory(/) #It can be changed by modify nachos/code/test/Makefile: GCCDIR mv. /mips-decstation. linux-xgcc. tgz / cd / #cross-compiler need not unzip, it’s already an executable file tar zxvf mips-decstation. linux-xgcc. tgz #Now compile Nach. OS. If you don’t have cross-compiler, compile will error. cd root/nachos-4. 0/code/ make cd userprog/ ls
Test Nach. OS #execute a test file. /nachos -e. . /test 1 Total threads number is 1 Thread test/test 1 is executing. Print integer: 9 Print integer: 8 Print integer: 7 Print integer: 6 return value: 0 No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting! Ticks: total 200, idle 66, system 40, user 94 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