
a quick over view, what this class is, and what basic knowledge you will need to have to kick off. I am confident on you already have or will spend couple days on those basic knowledge which required. This class referenced a lot of well-known operating systems Linux Unix some other rtos.
showing you tools setup in windows computer, you just need to follow what I am doing in the class, not too much difficult, every one can do it. I believe
how to use my template folder to create your own OS project, you just need to add start.S minios.c minios.h 3 files into your project which is created. super easy. this also try to test your toolset , if all of them are correct installed in your computer.
introduce you that , back to the old days, how does x86 cpu computer boot. what is the process x86 cpu run from bios to our start.S minios operating system program.
the cpu in the market today ,it has many different archtectures (arm/mips/powerpc), but I would like to say the x86 is most difficult one, because it has long history , it needs backwards compatible, i am showing you more about x86 programming model with special segement registers(cs/ds/es/ss/fs/gs), how does it addressing memory.
as you know bios only copys 512 bytes of disk data to memory 0x7c00 and jump there to run your minios operating system program, so we need first copy ourself fully to memory. this class show you how do we copy ourself to certain location of memory , sometimes people give it a term relocation.
this is most important class , introduce you how to turn cpu from real mode to protected mode, in real mode, x86 cpu only could address 20 bits address space which is 1 M max. the protected mode is a milestone of x86 cpu, with protected mode , the cpu could address 0 - 4G memory space. it is big change.
this is important as well, in this video, i am showing you how do we enable the paging system in x86 cpu, how do we mapping virtual address to physical address. this really help cpu run different code in same virtual address. give benefit to OS to load applications to same virtual address but actually point to different physical address.
as you know that, every system need a timer, it provide operating system system tick , and also this system tick is base reference tick to scheduler. we need this for task switch. also we will show you how does interrupts work. really interesting on computer.
x86 has 4 level of privileges. (0 highest for operating system), 1(not used),2(not used), (3 lowest level for application user), after we initialize for operating system part of work in our minios program, it needs to switch to task 0 to run with 3 lowest level for application. this video showing you how to do that with simulation a interrupt iret.
what is a basic operating system feature, schedule tasks. in this video, showing you how to create tasks , 0 and 1,pretty much task is just piece of code, or functions.
just like any operating system unix or linux, we need system call to do some special operating for tasks , for example showing letters on display , operate drivers, shutdown etc, those are centralized and managed by operating system. normally application does not have that permission to operate hardware or some resources. application usually just call system call , ask operating system to do it for them.
in the previous videos, I only use the GDT table to segment memory. its kind of global variable in your program , everyone could access it, but LDT table is local segment entry, which allow your task TSS point to it , and use it internally in one task. it is kind of local variables, only your function can access the variables. it is great to do task(or process) isolation , or sharing.
This course will cover both theoretical operating system (OS) concepts and their practical application. We will first introduce the OS concepts which will then be directly applied to the development of our 300-line mini OS. You will learn about both hardware and software responsibilities from the CPU boot process to scheduling, interrupts, timers, system calls, memory mapping, paging, etc.
I struggled a lot myself when learning some of these concepts for the first time in college. It was always hard learning about operating system theory in textbooks without a source code reference. Despite being very interested in the topic, I was not successful in internalizing these concepts the first time around as I didn't have a live example to meddle with and actually see running. This is my motivation for this course - to provide learners with what I myself did not have.
I hope you all enjoy the instruction. I would very much appreciate any feedback you may have or suggestions on topics for further content. The best way to help me is to leave a review and share the class link with your friends. I'm currently planning to succeed this course with one on how to fully understand Linux kernel source code (v0.11.0).
Q&A:
Your feedback is always welcome! Once you register my class, you will see each source code file attached. You can also send me messages and make an appointment for the Zoom Q&A meetings on the weekends to let me know your thoughts or raise any questions on the material. Happy to meet you guys.