OS161 Debug Tips

In doing OS161 assignments, if you don't know how to use GDB and how to use it efficiently, you're screwed, and will die very ugly. It's a very important skill to use GDB to identify what's wrong with your code. That's the first step towards to fix the bug.

more ...

OS161: Unknown syscall -1

When working on OS161 system calls, you'll probably see a bunch of this error, especially you haven't implemented _exit syscall and try to do some basic user programs, e.g., p /bin/true.

Note, this problem has been fixed in OS/161 version 1.99.07.

more ...


OS161 Synchronization Primitives: RWLock

The idea of Reader-Writer Lock is quite simple. In normal lock, we don't differentiate the threads. That said, each thread who wants to enter the critical section must first acquire the lock. But on a second thought, you may find that threads actually have different behavior inside the critical section: some threads just want to see the values of shared variable, while others really want to update those variables.

more ...






OS161 Duplicated TLB entries

Date Category os161 Tags tlb / vm

Sys161 will panic if you try to write a TLB entry with a entryhi, but there are already a TLB entry with the same entryhi but in a different TLB slot. This is because entryhi should be a UNIQUE key in the TLB bank.

more ...