This is not the current version of the class.

Lecture 9: Debugging survey

Kernel correctness is incredibly important, so kernel authors build extensive debugging and self-checking infrastructure into their systems. But kernels are deployed in challenging situations, so debugging tools designed more for simple, user-level processes don’t always apply. We can add a lot to our debugging toolboxes by considering how kernel designers make their systems more robust. Today, we consider the spinlock subsystem.

Part 1: Survey

In the first part, we’ll look at other operating systems’ spinlocks and characterize their debugging and robustness features, and differences from Chickadee’s spinlocks.

Every group will want to familiarize themselves with Chickadee’s k-lock.hh. Then each group should choose an operating system. Here’s a selection. FreeBSD and Linux’s implementations are far more complex. Each group should tackle another one teaching OS and then one real OS. Are the teaching OS features mirrored in the real OS? Does the real OS have more features? What features?

OS/161 teaching operating system

xv6 teaching operating system

FreeBSD operating system

Linux operating system

Part 2: Recommendations

Look at code (possibly dividing the work among the group) and discuss about what you see. Develop a proposal for changes to Chickadee’s k-lock.hh file to make it more debuggable. Mention features you found in the other operating systems that should not be ported to Chickadee, as well as features that should. Outline implementations if you can.

Part 3: Presentations and discussion

In the last half hour of class, each group will present their ideas; we’ll discuss and conclude.