PT-OS 一个玩具操作系统

ProtoType Operating System(PT-OS)

This is a simple Operating System, Which implements some useful component. All componnet of PT-OS is just ProtoType, and that is origin of its name. When you have some intersting ideas, and you can implement them in PT-OS. And I think it will reduce the waste of time.

I gave detailed comments in code and design ideas in /doc/ dir. And all of them is wrote in chinese.

PTOS target

These are the target that I want to do.

Multi-Core

  • single Intel core (It's working)
  • two same Intel cores (In the future)
  • two Intel cores with different frequency (In the future)
  • single RISC-V 32 core (In the future)

There is a problems that the Hardware-Platform is based on Intel, and I want to transplant it to other platforms in the future. Recently I am building a SOC based on RISC-V ISA, so this maybe a new direction.

Memory Management

  • physical page management (It's testing)
  • Fine-grained memory management (In the future)

The detailed information about memory will be showed

Task Management

  • ELF program load (It's doing)
  • Kernel process and thread (In the future)
  • User process and thread (In the future)
  • Simple priority scheduling (In the future)
  • CFS scheduling (In the future, and it needs a long time)
  • EAS scheduling (In the future, and it needs a long time)

Interrupt and Timer Management

  • Interrupt controler based on 8258A (It's working)
  • Timer based on 8253 (It's working)

Debug and Error Handling

  • Debug port
  • Error Handling module

Developing Environment

Platform and ToolChain

  • Linuxmint 17.3/18.3
  • GNU gcc 5.4
  • GNU ld 2.26.1
  • GNU Make 4.1
  • bochs 2.6.9

If I build the RISC-V SOC successfully, and the "vivado" will be added in tools.

Compile Bochs

Fisrt step, you should download "bochs-2.6.9.tar.gz" from Bochs Website

Second step, you should install some package to solve dependency.

sudo apt-get install gcc g++ build-essential xorg-xdev 
xserver-xorg-dev libgtk2.0-dev bochs-sdl

Third step, you should configure bochs in bochs_dir.

./configure --enable-debugger --enable-disasm --enable-iodebug 
--enable-x86-debugger --with-x --with-x11

Final step, you should compile bochs in bochs_dir.

make -j8

这是我自己在推进的一个简易的操作系统,算是一个理论到实践的过程。

目前才刚开始一部分,基本每周都会推进,有兴趣的可以进行交流。



猜你喜欢

转载自blog.csdn.net/zhangshuaiisme/article/details/80718433