Nachos

所属分类:操作系统开发
开发工具:Others
文件大小:473KB
下载次数:16
上传日期:2008-03-06 21:32:06
上 传 者alphaomega
说明:  Nachos是个教学用的小型操作系统,比较适合分析,使用MIPS指令集
(Nachos is a teaching small operating system, more suitable for analysis, using the MIPS instruction set)

文件列表:
NachOS-4.1 (0, 2008-03-06)
NachOS-4.1\c++example (0, 2008-03-06)
NachOS-4.1\c++example\c++.ps (187752, 2002-12-16)
NachOS-4.1\c++example\c++.tex (66890, 2002-12-16)
NachOS-4.1\c++example\copyright.h (1224, 2002-12-16)
NachOS-4.1\c++example\inheritstack.cc (6276, 2002-12-16)
NachOS-4.1\c++example\inheritstack.h (3026, 2002-12-16)
NachOS-4.1\c++example\list.cc (3604, 2002-12-16)
NachOS-4.1\c++example\list.h (919, 2002-12-16)
NachOS-4.1\c++example\Makefile (706, 2002-12-16)
NachOS-4.1\c++example\stack.cc (3569, 2002-12-16)
NachOS-4.1\c++example\stack.h (1399, 2002-12-16)
NachOS-4.1\c++example\templatestack.cc (3921, 2002-12-16)
NachOS-4.1\c++example\templatestack.h (1252, 2002-12-16)
NachOS-4.1\code (0, 2008-03-06)
NachOS-4.1\code\build.cygwin (0, 2008-03-06)
NachOS-4.1\code\build.cygwin\Makefile (12006, 2003-10-11)
NachOS-4.1\code\build.cygwin\Makefile.dep (31309, 2002-12-16)
NachOS-4.1\code\build.linux (0, 2008-03-06)
NachOS-4.1\code\build.linux\Makefile (11972, 2003-10-11)
NachOS-4.1\code\build.linux\Makefile.dep (647, 2003-10-13)
NachOS-4.1\code\build.macosx (0, 2008-03-06)
NachOS-4.1\code\build.macosx\Makefile (11971, 2003-10-11)
NachOS-4.1\code\build.macosx\Makefile.dep (634, 2002-12-16)
NachOS-4.1\code\filesys (0, 2008-03-06)
NachOS-4.1\code\filesys\directory.cc (6193, 2002-12-16)
NachOS-4.1\code\filesys\directory.h (2878, 2002-12-16)
NachOS-4.1\code\filesys\filehdr.cc (5241, 2002-12-16)
NachOS-4.1\code\filesys\filehdr.h (2346, 2002-12-16)
NachOS-4.1\code\filesys\filesys.cc (11792, 2002-12-16)
NachOS-4.1\code\filesys\filesys.h (3146, 2002-12-16)
NachOS-4.1\code\filesys\openfile.cc (6857, 2002-12-16)
NachOS-4.1\code\filesys\openfile.h (3055, 2002-12-16)
NachOS-4.1\code\filesys\pbitmap.cc (2808, 2002-12-16)
NachOS-4.1\code\filesys\pbitmap.h (1173, 2002-12-16)
NachOS-4.1\code\filesys\synchdisk.cc (3060, 2002-12-16)
NachOS-4.1\code\filesys\synchdisk.h (1957, 2002-12-16)
NachOS-4.1\code\lib (0, 2008-03-06)
NachOS-4.1\code\lib\bitmap.cc (4759, 2002-12-16)
NachOS-4.1\code\lib\bitmap.h (2053, 2002-12-16)
... ...

Exercises: #0 Look into the "shell" sub directory. Everything is in there. You will have to come up with a small library with nice little helpers (like printf, strncmp, strcmp, atoi, etc.) and some shell programs (like ls/dir, cat/type, etc.). On a Windows platform you may have to change the SHELL variable in nachos_syscall.c. Exec is different in NachOS! In here Exec will take all parameters spin of a shell and execute it. This will be different in NachOS! For parameters use ExecV! #1 Look into the "threads" sub directory. Everything is in there. The synchronization mechanisms have to be implemented in "synch.cc" and "synch.h". To start your tests just hack in another shell parameter in kernel.cc. Define your little test suite via a compiler parameter, so you can omit it later on. #2 The system calls are implemented in "userprog/exception.cc" and "userprog/ksyscall.h". You have use the functions "ReadMem" and "WriteMem" of "machine/machine.*" to access the simulated main memory. You'll have to build the coff2noff tool in order to compile the test programs. #3 Your system calls may have to be rewritten! Most stuff is due in "userprog/addrspace.*", "userprog/exception" and #4 Mainly done in the filesystem subdir. Be aware of locking problems! #5 You're on your own, pal! Don't touch the machine dir! Building instructions for NachOS-SHELL: * go to the directory shell * execute the local configure script * run make Building Instructions for NachOS: * go to the directory build., where is your working OS * do a "make depend" to build depenencies (everytime you change the makefile!) * do a "make" to build NachOS Usage: see "nachos -u" for all command line options Building and starting user-level programs in NachOS: * use Mips cross-compiler to build and link coff-binaries * use coff2noff to translate the binaries to the NachOS-format * start binary with nachos -x

近期下载者

相关文件


收藏者