I would like to add one thing: People forget that a kernel has to run on pretty much bare metal. If you're lucky you have BIOS there helping you a bit at the start, but not really. (Yay for obscure backwards compatibility tricks that the folks at Microsoft, IBM and Intel came up with.) So your standard libraries are usually quite limited, if you have them at all. And even then they're usually too slow to deal with anyway, so you end up rewriting everything in X86 assembly anyway.