x86-64 kernel
Flint
A freestanding x86-64 kernel that boots under QEMU through a multiboot2 stub and builds its own long mode page tables before it does anything else. It has a buddy allocator over the physical memory map, a slab layer for kernel objects, a preemptive round robin scheduler on the local APIC timer, and a shell on the serial port. Faults are handled rather than triple faulted, so a bad dereference in a task prints a register dump and kills the task instead of resetting the machine.

Bring-up
The bootloader hands over in protected mode with paging off. The stub builds an identity mapping for the first gigabyte, enables PAE and long mode, jumps to 64 bit code, then immediately discards that identity mapping in favour of a higher half mapping it constructed itself. Everything after that point runs against page tables the kernel owns.
The physical memory map arrives from multiboot2 and is almost never what the documentation implies. Regions overlap, are misaligned, and include holes that are reserved for reasons the map does not explain. The allocator is initialised from the map only after it has been normalised and every reserved range has been carved out.
Memory
A buddy allocator handles page-granularity requests and keeps free lists per order, which makes coalescing a matter of flipping one bit and checking a neighbour. On top of that sits a slab layer for the fixed-size objects the kernel allocates constantly: task structures, file handles, list nodes.
The slab caches poison freed objects. Use after free in a kernel is otherwise a silent corruption that surfaces somewhere unrelated, minutes later, in a completely different subsystem.
Not triple faulting
The easy version of a hobby kernel resets the machine on any fault, which destroys the evidence. Flint installs handlers for the faults that carry useful information, decodes the error code, prints the faulting address, the register file and a stack walk, and then terminates only the offending task.
A kernel that survives its own bugs long enough to describe them is enormously faster to work on than one that reboots.