Q: When calling our program to test printchar, our menu slows down. If I run the test program more than a few times (around 5) the kernel complains with "Running program /testbin/printchar failed: Out of memory". Does anyone else have this problem/had the problem and know what could be wrong? A: The kernel is currently configured to only allocate memory but not deallocate memory. After running a program a few times, you will see the "out of memory" error. This will be fixed in Assignment 3. -------------------------------------------------------------------------------- Q: I wanted to clarify if it is required that we must implement the debug flags such that we are able to turn two or more debug messages on at the same time or do we only need to turn them on one at a time. A: It should be possible to enable or disable each debug flag independently from the menu. Hence, multiple debug flags may be enabled simultaneously. Quoting from the assignment handout: "For example, if its value is 0x012, then DB_SYSCALL and DB_THREADS messages are printed." -------------------------------------------------------------------------------- Q: After I have created a printchar file and made necessary (changes to) relevant makefiles, I executed "p testbin/printchar" in the kernel and I got error messages below. OS/161 kernel [? for menu]: p testbin/printchar Operation took 0.000157520 seconds OS/161 kernel [? for menu]: Fatal user mode trap 2 (TLB miss on load, epc 0x400aa0, vaddr 0x60) sleep: Dropping thread panic: I don't know how to handle this sys161: 297263163 cycles (4733175k, 60u, 292529928i) sys161: 1932 irqs 6 exns 0r/0w disk 24r/821w console 8r/0w/3m emufs 0r/0w net sys161: Elapsed real time: 11.886221 seconds (25.0091 mhz) sys161: Elapsed virtual time: 11.890526520 seconds (25 mhz) I couldn't figure out what has gone wrong. Does anyone know what I might have done wrong? Or did I run the printchar program wrongly? A: The way you are invoking the program "p testbin/printchar" is definitely correct. The problem likely lies within your implementation of printchar. Notice that the vaddr is 0x60, close to 0. That seems like you might be accessing a NULL pointer (e.g., accessing a structure field at offset 0x60 from a NULL pointer). --------------------------------------------------------------------------------