Teach you how to code an OS by yourself.

前言

电脑

操作系统,作为人类当前创造出来的最复杂的系统,其蕴含了大量精巧的设计。完全理解操作系统,应该是每一个程序员都想做的事情,但是每当我们想要去学习操作系统,了解其奥秘时,都会被里面 晦涩难懂的设计和一些闻所未闻的名词劝退。即使没有被劝退,非常痛苦的看完一本晦涩难懂的操作系统的书籍后,也会发现自己好像只是理解了一点操作系统的皮毛,并没有对其有一个很透彻的理解。而且时间长了之后,那些好不容易学到的"皮毛"也会被时间带来的“遗忘之风”吹散。

而且操作系统不仅要求对底层的硬件知识有一定的了解,对于汇编语言、C语言、数据结构与算法都需要有一定的基础。这些基础里面任何一个看起来都需要很长的时间去学习。因此完全理解操作系统,变成了一件非常非常困难的事情。而且在国内,由于操作系统的相关书籍水平参差不齐,大学的课程也大都将多个科目分开讲授,没有从实践的角度去解释清楚各个科目之间的联系,因此完全理解操作系统更是变得尤其困难。

结构

但是近几年随着国内教育的变革,以及国内一些年轻的、怀着理想的程序员们可以在视频软件(如:B站) 上发布自己对一些知识的理解,并尝试用十分通俗易懂且形象的方式将其呈现出来。“星星之火,可以燎原。”这些微小的变化与努力汇集到一起,使得我们如果想要系统性地学习与了解操作系统,变得没有那么困难。下面是我自己整理的一些课程:

编程前你最好了解的基本硬件和计算机基础知识(模拟电路)

编程前你最好了解的基本硬件和计算机基础知识(数字电路)

从0到1设计一台计算机

北京大学精品公开课:计算机组成与设计

操作系统(哈工大李治军老师)

《一个64位操作系统的设计与实现》

深入理解计算机系统(动画视频)

深入理解计算机系统(原书第3版)

这些课程大多形象具体,老师们授课由浅入深,风格诙谐幽默,让晦涩难懂的东西变得通俗易懂。而且这些课程涵盖计算机系统的几个大的方面,大家可以按照 模电——> 数电 ——> 从0到1设计与实现计算机——> 计算机组成原理(北大)——>操作系统(哈工大)——>《一个64位操作系统的设计与实现》的顺序,并以《深入理解计算机系统》为辅助材料来进行学习。诚然,这是一个漫长的过程,但是大家按照这个顺序去学习,必然会有一定的收获。快餐式的学习一定会伴随着快餐式的遗忘,唯有缓慢地长期地系统性地学习才会为自己带来真正的成长,对一些知识也会有自己的理解。

学习结构

而本项目除了介绍上面这些课程以外,主要记录了操作系统的学习过程中对于李治军老师讲授的操作系统课程中的 linux0.1.1进行扩展的一些实验说明及代码,以及通过阅读《一个64位操作系统的设计及实现》来自己编写的一个64位的操作系统,同时记录了自己实现过程的一些自己的想法与收获。如果哪些地方有问题,也欢迎各位指出来,一起进行学习与讨论。

项目结构说明

  • linux-0.1.1-labs : 在linux-0.1.1上做的一些实验。
  • Without-OS :自己编写的完整的64位操作系统。
Similar Resources

Project is to port original Zmodem for Unix to CP/M and provide binaries and source code for platform specific modification as needed. Based on 1986 C source code by Chuck Forsberg

Zmodem-CP-M This repository is intended to foster a RetroBrewComputers community effort to port the original Zmodem source code for Unix to CP/M so ev

Apr 7, 2022

Project is to port original Zmodem for Unix to CP/M and provide binaries and source code for platform specific modification as needed. Based on 1986 C source code by Chuck Forsberg

Zmodem4CPM This repository is intended to foster a RetroBrewComputers community effort to port the original Zmodem source code for Unix to CP/M so eve

Apr 7, 2022

This is a compilation of the code and images for all Arduino code in the Robotics 11 class.

This is a compilation of the code and images for all Arduino code in the Robotics 11 class.

Robotics 11 - Arduino This is a compilation of the code and images for all Arduino code in the Robotics 11 class. All code can be viewed in each proje

Oct 29, 2021

Upgraded from Pixar postcard path tracing, instead of printing Pixar, this program print my name, which pose to be more challenging than the original code. The upgraded is also more readable and run 9x faster than the original source code.

Upgraded from Pixar postcard path tracing, instead of printing Pixar, this program print my name, which pose to be more challenging than the original code. The upgraded is also more readable and run 9x faster than the original source code.

SDF-Sphere-Tracing Upgraded from Pixar postcard path tracing, instead of printing Pixar, this program print my name, which pose to be more challenging

Jun 21, 2022

An Arduino library which allows you to communicate seamlessly with the full range of u-blox GNSS modules

An Arduino library which allows you to communicate seamlessly with the full range of u-blox GNSS modules

u-blox makes some incredible GNSS receivers covering everything from low-cost, highly configurable modules such as the SAM-M8Q all the way up to the surveyor grade ZED-F9P with precision of the diameter of a dime.

Jun 14, 2022

A program that allows you to hide certain windows when sharing your full screen

A program that allows you to hide certain windows when sharing your full screen

Invisiwind Invisiwind (short for Invisible Window) is an application that allows you to hide certain windows when sharing your full screen.

May 25, 2022

The Pizza Compass will determine your location and direct you to the nearest pizza place. It’s like a regular compass, but better!

Pizza_Compass A Particle project named Pizza_Compass Welcome to your project! Every new Particle project is composed of 3 important elements that you'

Apr 16, 2022

An app that allows you to edit/create apps in Dash

AppAdder On Ubuntu, have you ever run a program or AppImage and the app not had an icon? This is a personal pet peeve. I've used AppImageLauncher to i

Jul 6, 2021

Simple and easy script language for your dead brain, or break time of you.

What is this trush? Shut up, this isnt a trush. Lol This is a easy and simple script language. Change the world. Rotation the world. BIG REVOLUTION OF

May 28, 2021
Go through the readme... fork ....add....send a pull request .... get yourself in the contribution list...Plant the tree

Hacktoberfest 2021 Follow the README below to get started! Table of contents Getting Started The Process The Process star this repo Fork this reposito

Jan 5, 2022
Had a tough time playing Microsoft Wordament ? Well WORDament_Solver has your back. It suggests you meaningful words you can use while playing the game and help you top the leaderboard.
Had a tough time playing Microsoft Wordament ? Well WORDament_Solver has your back. It suggests you meaningful words you can use while playing the game and help you top the leaderboard.

WORDament_Solver Had a tough time playing Microsoft Wordament ? Well WORDament_Solver has your back. It suggests you meaningful words you can use whil

Aug 19, 2021
Some hypervisor research notes. There is also a useful exploit template that you can use to verify / falsify any assumptions you may make while auditing code, and for exploit development.

Introduction Over the past few weeks, I've been doing some hypervisor research here and there, with most of my focus being on PCI device emulation cod

Mar 5, 2022
a C program to say hi to you :) also you're cute <3

You're gonna need to be on linux (too lazy for windows) and have gcc installed. * Installing ---------- * 1 --- To install first create a "hi

Sep 21, 2021
Arduino sample code to help you get started using the Soracom IoT Starter Kit!
Arduino sample code to help you get started using the Soracom IoT Starter Kit!

Soracom IoT Starter Kit The Soracom IoT Starter Kit includes everything you need to build your first connected device. It includes an Arduino MKR GSM

Feb 22, 2022
NightDriverStrip is a source code package for building a flash program that you upload to the ESP32 microcontroller.
NightDriverStrip is a source code package for building a flash program that you upload to the ESP32 microcontroller.

NightDriverStrip is a source code package for building a flash program that you upload to the ESP32 microcontroller.

Jun 19, 2022
Please feel free to use this code if you need to keep track of accelerometer and gyro data :)

IMUArduinoDataCollection Please feel free to use this code if you need to keep track of accelerometer and gyro data :) This code takes in xyz motion b

Nov 9, 2021
Program that allows you to get the source code of a website's home page without doing it manually. Use it at your own risk.

Website-Homepage-Grabber Install one of the folders x64 or x32 if the program doesn't work(probably because you don't have visual studio installed) If

Feb 19, 2022
A simple processor emulator written in c++ that can parse and execute x32 code. x32 is binary code made by me for this processor.

A SIMPLE PROCESSOR EMULATOR AND CODE EXECUTOR The Repository This is a fairly new project and is still heavy in development. If you find and bugs feel

Jan 20, 2022
Source code for the article "Code vs Data Driven Displacement"

Code vs Data Driven Displacement This repo contains the source code for all the demos from this article. It uses raylib or more specifically raygui so

Jun 23, 2022