home tutorials faq contact
CS tutorials Share you information

Next: System Calls and Exception Up: User-Level Processes Previous: Process Creation

Creating a Noff Binary

Nachos is capable of executing a program containing arbitrary MIPS instructions. For example, C programs in the test directory are compiled using gcc on a MIPS machine to create ``.o'' files. To create an a.out binary file, the loader prepends the instructions in test/start.s before the code of the user program. File start.s contains initialization code that needs to be executed before the user's main program. Specifically, the very first instruction in start.s calls the user-supplied main routine, whereas the second instruction invokes the Nachos Exit system call, insuring that user processes terminate properly when their main program returns. In addition, start.s contains stub modules for invoking system calls (described below).

Nachos
Tutorials
Roadmap
Source Code

Introduction
Threads
Interrupts
Synchronization
System Calls
Exception Handling
Multiprogramming
File System
Networking

Tutorials
Lab 1 Tutorial
Lab 2 Tutorial
Lab 3 Tutorial
Lab 4 Tutorial
Lab 5 Tutorial


© 1999-2008 - All rights reserved. CS tutorials™ and the logo are registered trademarks of CS tutorials.