1 00:00:00,880 --> 00:00:07,090 Hello, welcome to the course. In this course, I will show you how to build a simple operating system for x86 architecture 2 00:00:07,960 --> 00:00:08,690 , 3 00:00:08,710 --> 00:00:15,820 step by step. I will also cover the basics of the x86 architecture and low-level programming 4 00:00:15,820 --> 00:00:16,900 in order to build the projects. 5 00:00:17,960 --> 00:00:24,620 Who is the course for? If you are a student who learned the operating system concepts 6 00:00:24,620 --> 00:00:29,300 and wants to put them into practice. Or you are just curious about the operating system. 7 00:00:29,630 --> 00:00:35,390 You want to know how the OS works. And you want to build a hobby OS, 8 00:00:35,390 --> 00:00:37,220 but you don’t know how and where to start. 9 00:00:38,660 --> 00:00:44,060 This course will teach you things you need to know to achieve the goals. And I will take you through the process of 10 00:00:44,060 --> 00:00:46,460 building a small working system. 11 00:00:47,440 --> 00:00:52,150 Before you take this course, you need to know the basics of x86 assembly language. 12 00:00:52,720 --> 00:00:59,680 For example, what is move instruction, what is add instruction etc. The basic knowledge of c language is also required 13 00:00:59,680 --> 00:01:00,720 . 14 00:01:01,410 --> 00:01:02,860 We will write the kernel in C. 15 00:01:03,070 --> 00:01:06,670 So we will use these two languages to build the operating system. 16 00:01:07,900 --> 00:01:09,580 Now Let’s walk through the course. 17 00:01:11,270 --> 00:01:17,420 The first section of the course is introduction to the course and operating system. The lecture must see 18 00:01:17,570 --> 00:01:23,720 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 19 00:01:23,720 --> 00:01:27,650 to build and test the os projects. 20 00:01:28,490 --> 00:01:33,650 And then we start to build our bootloader and run it both on virtual machine and real machine. 21 00:01:35,070 --> 00:01:41,100 After we write the bootloader, we will learn how to prepare for mode switching. We switch from real mode to protected mode 22 00:01:41,100 --> 00:01:47,970 and then jump to long mode. Our kernel is running in 64-bit mode. After we switch to 64-bit mode, 23 00:01:47,970 --> 00:01:53,670 we will see how to handle exceptions and interrupts, how to switch between kernel mode and user mode 24 00:01:53,670 --> 00:01:54,960 . 25 00:01:56,410 --> 00:02:02,410 Then we build the kernel using c language, write a small library for the kernel code 26 00:02:02,410 --> 00:02:07,050 and implement print function to print messages on the screen which will give us valuable information. 27 00:02:08,070 --> 00:02:14,160 The assertion is used to perform checks in the kernel code and it’s very useful. 28 00:02:14,160 --> 00:02:20,130 After we load our kernel, we build the memory management module to allocate and free memory. 29 00:02:20,130 --> 00:02:22,550 In this section, we will see how to manage the free memory using paging. 30 00:02:23,670 --> 00:02:30,180 Then we move on to process section. We will see how to create a user process, how to use kernel services with system calls 31 00:02:30,180 --> 00:02:31,290 . 32 00:02:32,290 --> 00:02:38,140 We focus on the scheduling and how to shift between different states. 33 00:02:38,140 --> 00:02:43,000 In the next section, we will write a ps/2 keyboard driver and interact with the kernel using a console. 34 00:02:43,690 --> 00:02:45,610 The console is like a command prompt 35 00:02:45,790 --> 00:02:46,930 where we issue a command 36 00:02:46,930 --> 00:02:48,850 and the kernel will execute this command. 37 00:02:50,140 --> 00:02:56,140 In the section filesystem we will write a file module which reads the data in the fat16 partition 38 00:02:56,470 --> 00:02:58,750 and run user programs in the system. 39 00:02:59,930 --> 00:03:05,630 Each lecture is packed with pure information and comes with source code. You can make notes while you watch the video. 40 00:03:05,630 --> 00:03:08,030 By the end of the course, 41 00:03:08,270 --> 00:03:14,210 I’m confident that you will know how to write a small kernel for the x86 architecture and be able to 42 00:03:14,210 --> 00:03:16,400 write your own operating system projects.