Posts
Events and Scheduling
A non-preemptible kernel Preemption; that is, the forceful stopping of a unit of code to allow another to be scheduled, is a critical component of any useful Operating System. Without it, arbitrary user processes could lock down a CPU core for as long as they like; moreover, even nice processes would have to be constantly aware of how long they are running and yield control when needed.
However, in the kernel, we can possibly get away with not preempting.
read more
Posts
Page Faults and MMAP
Handling Page Faults with MMAP Virtual memory systems that utilize memory mapping (mmap) functionality require complex page fault handling to support various mapping types and access patterns. In this article we will talk about how to build a page fault handler for mmap(), with a particular focus on the different mapping types (anonymous and file-backed), sharing modes (private and shared), and the six distinct page fault scenarios that must be handled correctly.
read more
Posts
Audio
Why Have Audio? Developing an operating system is a rather monstrous task with many features that are absolutely necessary for the OS to be useful. Audio is not one of those features, so why provide support for it? Surely if you have worked on a large project, like an OS, you have gotten the most satisfaction when you see the project have some kind of output. In our case the output we would have liked was to hear something.
read more
Posts
Boot and Test
And We’re Live! I remember how this madness began. I had just finished speaking with Dr. Gheith and learned that we would receive no starter code. None. Zero. Nil. Naturally, my first question was, how do we boot?
I had previously taken CS439 with Dr. Norman, and while we did briefly - for a whole of five minutes - discuss how operating systems begin their lifecycle, it was by far not enough knowledge to go out and write ourselves a bootloader from scratch.
read more
Posts
Virtual Memory
Written by: Kshitij Kapoor
Accessing Memory to Access Memory The most interesting description of a computer that I have ever heard was the following: “A computer is state held in memory, and various external components are modifying that state”.
This description, of course, came from Dr. Gheith, in the second lecture of his Multicore Operating Systems course. So, given the importance that that description places on memory - and, by extension, virtual memory - and the fact that I was starting work on the virtual memory system for TAOS just a few days later, it’s needless to say that I was a little overwhelmed.
read more
Posts
SD Cards
Why have an SD Card at all When we started with TAOS we were trying to run on x86 laptops. The one we had focused on was a laptop that had eMMC storage, so since eMMC is basically a fancy SD card, The first thing I worked on was an SD card driver that could read and write blocks to unblock the file system people.
Useful reading The SD association provides simplified specifications, they might not be enough to use for a commercial grade operating system, but they are good enough to use for hobby operating systems.
read more