/chuj-elephant-os

《操作系统真象还原》中操作系统的实现

Primary LanguageC

chuj-elephant-OS

My implement of the operating system in the book 《操作系统真象还原》

where to run

you can run in

  • bochs
  • A real IA-32 machine

making dependence

Only tested under Ubuntu 20.04, with following program installed

  • gcc-4.8
  • nasm
  • dd
  • ld

how to run

if using bochs, simply use the following script

./start_bochs.sh

directly running in a real machine is not suggested, so, do not do that!

Makefile is provided, simply type make to build the disk image

finished

MBR

GDT setup (just a little) and enter Protected Mode

enter Paging mode

boot kernel

sys_putchar and sys_putstr

interrupt framework

memory mapping

thread scheduling

keyboard IO with buf

user process

syscall framework

sys_malloc and sys_free (a very simply memory manager)