Learning Operating System by Writing One