0%

One of the flaws in Nachos is that you cannot expand a file in the Nachos File System. So this is what experiment 5 does.

We need to do the append and half append, both from UNIX file to Nachos file and from Nachos file to Nachos file.

阅读全文 »

We define two separate implementations of the file system.

The “STUB” version just re-defines the Nachos file system operations as operations on the native UNIX file system on the machine running the Nachos simulation. This is provided in case the multiprogramming and virtual memory assignments (which make use of the file system) are done before the file system assignment.

The other version is a “real” file system, built on top of a disk simulator. The disk is simulated using the native UNIX file system (in a file named “DISK”).

In the “real” implementation, there are two key data structures used in the file system. There is a single “root” directory, listing all of the files in the file system; unlike UNIX, the baseline system does not provide a hierarchical directory structure. In addition, there is a bitmap for allocating disk sectors. Both the root directory and the bitmap are themselves stored as files in the Nachos file system — this causes an interesting bootstrap problem when the simulated disk is initialized.

阅读全文 »

Instructions

gdb ./program_name . Start the debugger.

disass Function . Show the disassemble code of Function.

b x . Set a breakpoint at line x.

阅读全文 »