Hello, welcome to the course. In this course, I will show you how to build a simple operating system for x86 architecture
,
step by step. I will also cover the basics of the x86 architecture and low-level programming
in order to build the projects.
Who is the course for? If you are a student who learned the operating system concepts
and wants to put them into practice. Or you are just curious about the operating system.
You want to know how the OS works. And you want to build a hobby OS,
but you don’t know how and where to start.
This course will teach you things you need to know to achieve the goals. And I will take you through the process of
building a small working system.
Before you take this course, you need to know the basics of x86 assembly language.
For example, what is move instruction, what is add instruction etc. The basic knowledge of c language is also required
.
We will write the kernel in C.
So we will use these two languages to build the operating system.
Now Let’s walk through the course.
The first section of the course is introduction to the course and operating system. The lecture must see
talks about how to use this course. So please don’t skip this video. The next section shows how to set up a working environment
to build and test the os projects.
And then we start to build our bootloader and run it both on virtual machine and real machine.
After we write the bootloader, we will learn how to prepare for mode switching. We switch from real mode to protected mode
and then jump to long mode. Our kernel is running in 64-bit mode. After we switch to 64-bit mode,
we will see how to handle exceptions and interrupts, how to switch between kernel mode and user mode
.
Then we build the kernel using c language, write a small library for the kernel code
and implement print function to print messages on the screen which will give us valuable information.
The assertion is used to perform checks in the kernel code and it’s very useful.
After we load our kernel, we build the memory management module to allocate and free memory.
In this section, we will see how to manage the free memory using paging.
Then we move on to process section. We will see how to create a user process, how to use kernel services with system calls
.
We focus on the scheduling and how to shift between different states.
In the next section, we will write a ps/2 keyboard driver and interact with the kernel using a console.
The console is like a command prompt
where we issue a command
and the kernel will execute this command.
In the section filesystem we will write a file module which reads the data in the fat16 partition
and run user programs in the system.
Each lecture is packed with pure information and comes with source code. You can make notes while you watch the video.
By the end of the course,
I’m confident that you will know how to write a small kernel for the x86 architecture and be able to
write your own operating system projects.