Nachos Lecture 2
Nachos Lecture 2
Phase 2. You have got one machine (machinepackage): You have to implements the incompleteOs (userprog package)· Run programs on MiPs!
Phase 2 • You have got one machine (machine package) • You have to implements the incomplete OS (userprog package) • Run programs on MIPS!
userprog package: UserKernel.java - a multiprogramming kernel.: UserProcess.java - a user process; manages theaddress space, and loads a program into virtualmemory. UThread.java - a thread capable of executinguser MiPS code.SynchConsole.java - a synchronized console;makes it possible to share the machine's serialconsole among multiple threads
userprog package • UserKernel.java - a multiprogramming kernel. • UserProcess.java - a user process; manages the address space, and loads a program into virtual memory. • UThread.java - a thread capable of executing user MIPS code. • SynchConsole.java - a synchronized console; makes it possible to share the machine's serial console among multiple threads
Interrupt Handler· Specificationtest/syscall.h? File Management Syscall-Create/Open/Read/Write/Close/Unlink- Use Machine.stubFileSystem.java to accessfile files in the test directory-FileDescriptor
Interrupt Handler • Specification test/syscall.h • File Management Syscall – Create/Open/Read/Write/Close/Unlink – Use Machine.stubFileSystem.java to access file files in the test directory – File Descriptor
Interrupt Handler: Process Management Syscall- exit: terminate the current processimmediately- exec: execute the program stored in thespecified file, with the specified arguments, ina new child process.-join: suspend execution of the current processuntil the child process specified by theprocessID argument has exited
Interrupt Handler • Process Management Syscall – exit: terminate the current process immediately. – exec: execute the program stored in the specified file, with the specified arguments, in a new child process. – join: suspend execution of the current process until the child process specified by the processID argument has exited