os-tutorial README

The project's README from github.com/cfenollosa/os-tutorial. As one markdown file: README.md.

os-tutorial

⚠️ Hey! This is an old, abandoned project, with both technical and design issues listed here. Please have fun with this tutorial but do look for more modern and authoritative sources if you want to learn about OS design. ⚠️

How to create an OS from scratch!

I have always wanted to learn how to make an OS from scratch. In college I was taught how to implement advanced features (pagination, semaphores, memory management, etc) but:

Inspired by this document and the OSDev wiki, I'll try to make short step-by-step READMEs and code samples for anybody to follow. Honestly, this tutorial is basically the first document but split into smaller pieces and without the theory.

Updated: more sources: the little book about OS development, JamesM's kernel development tutorials

Features

How to use this tutorial

  1. Start with the first folder and go down in order. They build on previous code, so if you jump right to folder 05 and don't know why there is a mov ah, 0x0e, it's because you missed lecture 02. Really, just go in order. You can always skip stuff you already know.

  2. Open the README and read the first line, which details the concepts you should be familiar with before reading the code. Google concepts you are not familiar with. The second line states the goals for each lesson. Read them, because they explain why we do what we do. The "why" is as important as the "how".

  3. Read the rest of the README. It is very concise.

  4. (Optional) Try to write the code files by yourself after reading the README.

  5. Look at the code examples. They are extremely well commented.

  6. (Optional) Experiment with them and try to break things. The only way to make sure you understood something is trying to break it or replicate it with different commands.

TL;DR: First read the README on each folder, then the code files. If you're brave, try to code them yourself.

Strategy

We will want to do many things with our OS:

Probably we will go through them in that order, however it's soon to tell.

If we feel brave enough:

Contributing

This is a personal learning project, and even though it hasn't been updated for a long time, I still have hopes to get into it at some point.

I'm thankful to all those who have pointed out bugs and submitted pull requests. I will need some time to review everything and I cannot guarantee that at this moment.

Please feel free to fork this repo. If many of you are interested in continuing the project, let me know and I'll link the "main fork" from here.

os-tutorial (cfenollosa/os-tutorial)

Searching Database…

这是什么?这是一个循序渐进的教程,带你从零开始构建一个小型操作系统,从引导扇区一直做到一个基础内核。
这是一个完成的操作系统,还是一系列课程?这是一系列编号的课程文件夹,每个文件夹都有自己简短的 README 和大量注释的代码,后一课建立在前一课的基础上。
我该怎么学习这个教程?从第一个文件夹开始,按顺序学习:先阅读该文件夹的 README(先决条件和学习目标),再研究带注释的代码,然后可以选择先自己尝试编写,再看示例。
开始之前我需要掌握什么?每一课的 README 开头都会说明所需的前置知识。作者期望你能熟练掌握底层编程,并且自己动手查资料,而不是依赖教程内置的理论讲解。
这个项目还在维护、内容是最新的吗?不再维护。作者明确标注这是一个旧的、已被放弃的项目,存在已知的技术和设计问题,并推荐更现代的资源来真正学习操作系统设计。
这个教程目前实际做到了哪些内容?根据策略列表,它已涵盖:不借助 GRUB 的引导、进入 32 位模式、从汇编跳转到 C、中断处理、屏幕和键盘 I/O,以及一个不断扩充的小型 libc,以上内容均标记为 DONE。
哪些主题已计划但尚未完成?尚未完成的计划包括内存管理、文件系统、简单的 shell、用户模式,以及多进程和调度,均标记为未完成;BASIC 解释器、GUI 和网络则属于可选的远期目标。
为什么课程里的理论这么少?作者有意省略了大部分理论,认为大学之后过多的理论会让操作系统开发显得比实际更难,并希望读者自行搜索不熟悉的概念。
如果作者不再更新,我还能继续这个项目吗?可以。作者欢迎复刻(fork),并表示如果有足够多的人想继续开发,他们会链接一个“main fork”。
Creator
cfenollosa
Size
0.1 MB
Stars
30.8K
Updated
CommitFeb 04
Age
12y
Commits · 90 Days