110 likes | 414 Views
Nachos introduction. Outline. NachOS Overview NachOS Install Assignment. Nachos Overview. NachOS. An instructional operating system Includes many facets of a real OS: Threads Interrupts Virtual Memory I/O driven by interrupts You can (and will) modify and extend it. NachOS.
E N D
Outline • NachOS Overview • NachOS Install • Assignment
NachOS • An instructional operating system • Includes many facets of a real OS: • Threads • Interrupts • Virtual Memory • I/O driven by interrupts • You can (and will) modify and extend it
NachOS • 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
NachOS 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
NachOS Install • #download NachOSwget http://neuron.csie.ntust.edu.tw/homework/97/OS/materials/nachos-4.0.tar.gz #unzip NachOStar -zxvf nachos-4.0.tar.gz#download cross-compilerwget http://neuron.csie.ntust.edu.tw/homework/97/OS/materials/mips-decstation.linux-xgcc.gz #move cross-compiler to root directory(/)#It can be changed by modify nachos/code/test/Makefile: GCCDIRmv ./mips-decstation.linux-xgcc.tgz /cd /#cross-compiler need not unzip, it’s already an executable filetar zxvf mips-decstation.linux-xgcc.tgz#Now compile NachOS. If you don’t have cross-compiler, compile will error.cd root/nachos-4.0/code/makecd userprog/ls
Test NachOS #execute a test file./nachos -e ../test/test1 Total threads number is 1Thread test/test1 is executing.Print integer:9Print integer:8Print integer:7Print integer:6return value:0No threads ready or runnable, and no pending interrupts.Assuming the program completed.Machine halting!Ticks: total 200, idle 66, system 40, user 94Disk I/O: reads 0, writes 0Console I/O: reads 0, writes 0Paging: faults 0Network I/O: packets received 0, sent 0