Giter Club home page Giter Club logo

xbook2's Introduction

xbook2操作系统内核

xbook2操作系统内核是一个基于intel x86平台的32位处理器的系统内核,可运行在qemu,bochs,virtual box,vmware等虚拟机中。

宏内核的内容比较大,像文件系统,网络协议等内容都比较庞大,在内核中会占用很多空间。因此,xbook将这部分内容转移到用户态,以服务(service)的形式出现。这样的话,内核空间减小了,并且,在一定程度上也能保障内核的健壮。但是缺点就是和服务通信效率低下,这一直以来就是在微内核中老生常谈的事情,只有以后慢慢提升通信效率。

除此之外,内核的划分也比较清晰,多任务(TASK 进程/线程),虚拟内存管理(VMM),进程间通信(IPC),以及驱动(DRIVERS),主要由这及部分组成。

xbook2被设计成一个跨处理器平台的架构,有ARCH目录,可以在里面添加一个新的处理器平台。不过目前也是尽量将平台相关的分离到arch里面,并为完全分离出来,待后面多实现几个平台后,才能更好的让处理器平台和内核部分进行更优化的分离。

内核结构示意图:

USER MODE:
+---------------------------------+
|shell | text edit | compiler     |
+---------------------------------+  
|netsrv | filesrv | guisrv| libOS |
+---------------------------------+
KERNEL MODE: 
+---------------------------+
|task | ipc | vmm | drivers |
+---------------------------+
|            arch           | 
+---------------------------+
\                           /
+---------------------------+
|          hardware         |
+---------------------------+

系统功能列表:

多进程,内核多线程,用户多线程
虚拟内存管理,分页内存管理,物理内存管理
管道通信,共享内存,消息队列,信号量

IDE硬盘驱动,PS/2鼠标,键盘驱动,VBE视频驱动
RTL8139网卡驱动,UART串口驱动

FATFS文件系统,LWIP网络协议
PTHREAD线程库

开发环境准备(Windows/Linux):

1. 用git从仓库克隆源码或者直接下载源码。
2. 配置最基础的工具集:gcc, nasm, ld, dd, rm, objdump, objcopy。
3. 配置虚拟机:qemu(默认),bochs,virtual box, vmware任选其一。
5. 进入xbook2的根目录目录,打开终端或者命令行,输入命令make build先构建环境,然后make run编译运行。

编译使用命令:

> make          # 只编译源码
> make build    # 构建环境
> make debuild  # 清理环境
> make run      # 编译并运行,默认使用qemu虚拟机运行
> make qemu     # 使用qemu虚拟机运行
> make qemudbg  # 使用qemu虚拟机进行调试
> make clean    # 清除编译产生的对象文件以及可执行文件

联系方式: 开源官网:www.book-os.org
E-mail: [email protected]
个人邮箱:[email protected]
个人QQ: 2323168280
开发交流QQ群:913813452

xbook2's People

Contributors

hzcx998 avatar zhuyu1997 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.