next up previous
Next: Disk Subsystem Interaction Up: Avenues for Future Previous: Enhancing Protected Mode

Removing the Simulator

There are a number of places where the Nachos simulator is still running between the PC hardware and the nachos kernel. Theoretically, we could compile the user programming code into our current implementation. This would allow us to run user processes, but they would be simulated MIPS binaries! Before user threads are a realistic possibility, we will need to remove the MIPS simulator from the machine directory.

In the current version, the simulated clock and interrupts are still present. Since there are no devices other than the timer to provide interrupts, and TimerInt interrupts do nothing, they are simply consuming clock cycles. Both these subsystems should be easily replacible by the real hardware. It may still be useful to keep the interrupt even queue though as a mechanism for scheduling when threads get to run on the CPU.

Timer ticks should be implemented using the UTI (User Timer Interrupt). The interrupt subsystem could be converted to use the Intel protected-mode interrupt subsystem. This allows the hardware to actually fire an interrupt on a page fault or other exception. Arguments are essentially converted from the PC style to the MIPS style before being passed to user processes. This might be the best thing for now, but a more general argument passing scheme would work better. It would allow the code to be more portable. Lastly, address space creation should use the local and global segment descriptor tables provided by the PC hardware. Instead, it still does static allocation from a pre-allocated block of memory.



Paco Hope
Wed Jun 21 23:54:28 EDT 1995