|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/developing-a-multithreaded-kernel-from-scratch/
课程评论:没有评论
这门 Coursera 课程“从零开始开发多线程内核!”旨在教授学员如何从头开始创建自己的多任务操作系统和内核。课程假设学员没有内核编程经验,从基础知识讲起。 课程分为两个主要部分: **1. 实模式开发:** * **入门:** 学习 BIOS 启动过程和内存工作原理。 * **开发引导加载程序:** 使用汇编语言编写一个输出“Hello World!”的引导加载程序,并在真实硬件上进行测试。 * **磁盘和中断:** 学习如何从硬盘读取扇区,以及实模式下的中断处理和创建。 * **基础概览:** 提供对内核开发的初步认识,避免信息过载,为后续更现代的内核开发打下基础。 **2. 保护模式开发:** * **32位多任务内核:** 创建一个支持 FAT16 文件系统的 32 位多任务内核。 * **内存保护与虚拟化:** 利用 Intel 处理器的内存保护机制,实现内核和用户程序的隔离。深入学习分页和虚拟内存技术,通过内存地址映射创建进程拥有独立内存空间的假象,包括对交换文件的解释。 * **虚拟文件系统:** 设计类似 Linux 内核的虚拟文件系统层,熟悉 FAT16 文件系统的结构(簇、链式结构),并实现自己的 FAT16 文件系统驱动,实现文件的创建。 * **任务与进程管理:** 实现任务和进程的功能。 * **键盘驱动:** 编写自己的键盘驱动程序。 * **内存管理:** 实现类似于 `malloc` 和 `free` 的函数,创建自己的堆管理器,跟踪内存使用情况。 * **ELF 文件加载:** 实现 ELF 文件加载器,能够加载包含程序的内存加载信息和段信息的 ELF 格式程序。 * **成果:** 完成一个功能完善的 32 位多任务内核,能够同时运行多个进程和任务,并包含一个可用的命令行 Shell。 **额外内容:** * **汇编语言补充:** 提供汇编语言的补充内容,帮助学员巩固汇编技能,即使是没有汇编经验的学员也能跟上课程。 * **讲师背景:** 课程由一位拥有 15 年软件工程经验,并曾专业开发 Linux 内核模块的专家讲授。
This course is designed to teach you how to create your very own multitasking operating system and kernel from scratch. It is assumed you have no experience in programming kernels and you are taught from the ground up.Real Mode DevelopmentReal mode is a legacy mode in all Intel processors that causes the processor to start in a legacy state, it performs like the old 8086 Intel processors did back in the way.In the "Real Mode Development" section of the course we start by learning about the boot process and how memory works, we then move on to creating our very own boot loader that we test on our real machine! This boot loader will output a simple "Hello World!" message to the screen and we write this boot loader in purely assembly language.In this section we also read a sector(512 bytes) from the hard disk and learn all about interrupts in real mode and how to create them.This section gives you a nice taster into kernel development, without over whelming you with information. You are taught the basics and enough about the legacy processors to be able to move forward to more modern kernel development further into this course.Protected Mode DevelopmentIn this section we create a 32 bit multi-tasking kernel that has the FAT16 filesystem. Our kernel will use Intel's built in memory protection and security mechanisms that allow us to instruct the processor to protect our kernel and prevent user programs from damaging it.This section is very in depth, you are taught all about paging and virtual memory. We take advantage of clever instructions in Intel processors to allow all processes to share the same memory addresses, this is known as memory virtualization. We map memory addresses to point to different physical memory addresses to create the illusion that every process that is running is loaded at the same address. This is a very common technique in kernel development and is also how swap files work (Those files that are used to compensate for when you run out of usable RAM).We create our own virtual filesystem layer that uses a design that is similar to the Linux kernel. This clever abstraction that will be taught to you was inspired by the instructors knowledge of writing Linux kernel drivers in his past. You are taught about the design of the FAT16 filesystem and how the FAT16 filesystem is broken down into clusters and that they can chain together. We then implement our very own FAT16 filesystem driver allowing files to be born!We implement functionality for tasks and processes and write our own keyboard drivers.In this course you also get to learn how memory management works, we implement the "malloc" and "free" functions creating our very own heap that's designed to keep track of what memory is being used. Memory management is essential in any operating system and kernel.Let us not forget that we even create an ELF file loader, we will compile all our operating systems programs into ELF files and allow the loading of binary programs or ELF programs. ELF files contain a lot of information that describes our program for example where our program should be loaded into memory and the different sections of the program.By the end of this course you will have a fully functioning 32 bit multi-tasking kernel that can have many processes and tasks running at the same time. You will have a working shell that we can use as well.Assembly language bonusThis is a bonus section designed to bring your assembly skills up to scratch should you struggle a little bit with the assembly language in this course. It's however advised you come to this course with experience in assembly language, we do use it and its important. Never the less if you want to take a chance on this course with no assembly experience then this section will help point you in the right direction so your able to take what you learned and apply it to the kernel.Taught by an expert that has created Linux kernel modules professionally in the work place. 15 Years Experience As A Software Engineer