备注

AI Translation Notice

This document was automatically translated by Qwen/Qwen3-8B model, for reference only.

  • Source document: community/ChangeLog/V0.1.x/V0.1.0.md

  • Translation time: 2025-05-19 01:48:03

  • Translation model: Qwen/Qwen3-8B

Please report issues via Community Channel

V0.1.0

备注

Author of this document: Longjin longjin@RinGoTek.cn

November 6, 2022

Preface

  DragonOS has been under development since January 15, 2022, and has now gone through nearly 300 days. In these many days and nights, it’s hard to count how much time has been spent on DragonOS development. I have basically given all my free time to DragonOS, and the estimated total working hours have already exceeded 1000 hours. It feels very rewarding to be able to release the first version.

  Since July 2022, a number of friends and mentors from six universities or companies have joined the development of DragonOS. I was very happy about this. I think, with everyone’s joint efforts, we can create an operating system that is truly practical! We have held 14 discussion meetings. I believe, with everyone’s joint efforts, in the future, we will be able to create an independent, open, server-oriented open-source operating system that can be used in production environments.

  Although DragonOS is currently just a toy-level operating system, it’s “only slightly more difficult than a undergraduate graduation project.” However, please don’t underestimate it. Its internal architecture design targets Linux 5.18 and later distributions. Although it has not yet reached the level of Linux, we are working hard to catch up. Thanks to the relevant resources of Linux, DragonOS has learned a lot of design ideas from Linux during its architecture design. The related components have considered scalability and portability as much as possible.

  A journey of a thousand miles begins with a single step. The release of DragonOS V0.1.0 is a new beginning. I hope, in the next ten years, we can work together with many partners, and by 2032, build DragonOS into a practical, widely used open-source operating system in the server field!

  A hundred boats race, the ones who row first win; in the middle stream, the brave win. I believe, with the continuous efforts of the community developers in the coming time, our goal will become a reality!

Special Thanks

  At the time of the release of DragonOS V0.1.0, I would like to express my sincere gratitude to my teachers, predecessors, and school!

  • Teacher Yao Zhicheng from Dali Town Central Primary School, Nanhai District, Foshan City: You are the guide who introduced me to computers and taught me programming. Ten years ago, when we talked, you said, “Our country currently does not have an independent and mature operating system.” This sentence planted the seed of my dream. You cultivated my love for computers, so I chose the major of software engineering. Thank you for your guidance back then, I will never forget your kindness!

  • Shimen Experimental School, Nanhai District, Foshan City: During the three years I studied at Shimen Experimental School, I am very grateful for the school’s “Strength-based Education” philosophy. Under the guidance of the teachers, I was able to fully develop my personality and talents, and achieved good results. During the three years at Shimen Experimental School, I learned C++, Java, and simple algorithms, and I developed several Android apps, accumulating nearly 6,000 lines of code.

  • Shimen Middle School, Nanhai District, Foshan City: “The road is long and the task is heavy, never forget to strive” is the school motto of Shimen Middle School. I think this motto should also become the motto of each new generation of youth. During the three years at Shimen Middle School, the education of national sentiment had a great impact on me. I think, as new generation of youth, we should shoulder the responsibility of the times, strive hard, and work for the development of the country, the strength of the nation, and the future of humanity!

  • South China University of Technology: “Broad learning, careful thinking, clear discernment, and firm action” – at SCUT, I received further learning and development. I broadened my horizons, learned to communicate with many people. Moreover, in the School of Software, I met a group of conscientious and responsible teachers. I am very grateful for the support of the school, which supported us in establishing the project group. I believe, with the support of the school, DragonOS can achieve better development and go further!

  • Professor Wang Guohua from the School of Software, South China University of Technology: Professor Wang is my teacher for the course “Operating System”. Under her guidance, I gained a deeper understanding of the principles of operating systems, and participated in the “Pan-Delta+ University Students’ Computer Works Competition”. In the Guangdong provincial selection in June 2022, DragonOS won the first prize and the Best Innovation Award.

  • Professor Tang Feng from the School of Software, South China University of Technology: Professor Tang is our project group’s on-campus mentor. Under her careful guidance, we will continue to move forward, keep our direction, and continuously build an open-source community. I sincerely thank Professor Tang for her guidance!

  • Yaotian Feng: I met this very capable person on Bilibili. He answered many of my questions. Many times, after I had debugged for several days without any idea, a few words from him would wake me up and help me find the path to solve the problem. He also shared with me the places where I might fall into traps, allowing me to have a psychological expectation when about to fall into a trap, so I wouldn’t feel so uncomfortable, ha ha.

Contributors List

The release of DragonOS V0.1.0 could not have been achieved without the joint efforts of the following friends:

Sponsors List

Thank you to the following students for their donations. We will keep working hard!

  • TerryLeeSCUT

  • Wu

  • slientbard

Kernel

Some Standards and Specifications Followed

  • Bootloader: Multiboot2

  • System Interface: POSIX 2008

Hardware Architecture

  • Currently supports running on x86-64 architecture processors

Bootloader

  • Uses Grub 2.06 as the bootloader

Memory Management

  • Implemented a bitmap-based page allocator

  • Implemented a slab allocator for allocating small, aligned memory blocks

  • Abstracted VMA (Virtual Memory Area)

  • Implemented VMA reverse mapping mechanism

  • Implemented MMIO address space auto-mapping mechanism

Multi-core

  • Supports multi-core boot. That is, after DragonOS starts, it will start the AP processor. However, to simplify the implementation of other kernel modules, currently, there are no tasks running on the AP processor.

  • Roughly implemented the IPI (Inter-Processor Interrupt) framework

Process Management

  • Supports process creation and recycling

  • Kernel threads

  • Kthread mechanism

  • User-space and kernel-space process/thread fork/vfork (note that user-space fork and kernel-space fork have some differences; kernel-space fork is more complex)

  • exec allows a process to execute a new executable file

  • Process timer sleep (sleep) (supports high-precision sleep with spin/rdtsc, supports sleep via context switching)

Synchronization Primitives

  • spinlock spin lock

  • mutex mutex

  • atomic atomic variable

  • wait_queue wait queue

  • semaphore semaphore

IPC (Inter-Process Communication)

  • Anonymous pipe

File System

  • Basic functionality of the VFS virtual file system

  • FAT32 file system (does not support deleting folders)

  • devfs device file system. Currently, only the keyboard file is registered.

  • rootfs root file system, provides support for other pseudo-file systems before the real disk file system is mounted

  • Mount point abstraction. Currently, file system mounting is implemented, and all mount points are managed in a stack-like manner (optimization is needed in the future)

Exception and Interrupt Handling

  • Handling of processor exceptions

  • Support for APIC

  • Softirq soft interrupt mechanism

  • Ability to trace the kernel stack

Kernel Data Structures

  • Ordinary binary tree

  • kfifo first-in-first-out buffer

  • Circular linked list

  • IDR mapping data structure

  • IDA ID allocation data component

Screen Display

  • VESA VBE display chip driver

  • Implemented a screen manager, supporting multiple display frameworks to be registered with the screen manager

  • Implemented a TextUI text interface framework, capable of rendering text to the screen. Also reserves support for scrollable pages and multiple display windows

  • printk

Kernel Utility Library

  • String operation library

  • ELF executable file support component

  • Basic math library

  • CRC function library

Software Portability

  • Ported the LZ4 compression library (V1.9.3), laying the foundation for future page compression mechanisms

Kernel Testing

  • ktest unit test framework

  • Supports outputting screen content to a file via serial port (COM1)

Driver Support

  • IDE hard disk

  • AHCI hard disk (SATA Native)

  • ACPI Advanced Power Configuration module

  • PCI bus driver

  • XHCI host controller driver (USB 3.0)

  • PS/2 keyboard

  • PS/2 mouse

  • HPET high-precision timer

  • RTC clock

  • Local APIC timer

  • UART serial port (supports RS-232)

  • VBE display

  • Virtual tty device

System Calls

DragonOS currently has a total of 22 valid system calls.

  • SYS_PUT_STRING Print characters to the screen

  • SYS_OPEN Open a file

  • SYS_CLOSE Close a file

  • SYS_READ Read from a file

  • SYS_WRITE Write to a file

  • SYS_LSEEK Adjust the file pointer

  • SYS_FORK Fork system call

  • SYS_VFORK Vfork system call

  • SYS_BRK Adjust the heap size to a specified value

  • SYS_SBRK Adjust the heap size by a relative value

  • SYS_REBOOT Reboot (this system call will be removed after sysfs is improved; please do not rely on this system call excessively)

  • SYS_CHDIR Change the working directory of the process

  • SYS_GET_DENTS Get metadata of directory entries

  • SYS_EXECVE Let the current process execute a new program file

  • SYS_WAIT4 Wait for a process to exit

  • SYS_EXIT Exit the current process

  • SYS_MKDIR Create a directory

  • SYS_NANOSLEEP Nanosecond-level sleep (up to 1 second), capable of high-precision sleep when less than 500ns

  • SYS_CLOCK Get the current CPU time

  • SYS_PIPE Create a pipe

  • SYS_MSTAT Get the current memory status information of the system

  • SYS_UNLINK_AT Delete a directory or delete a file link

Rust Support

  • Implemented a simple “hello world” in Rust. Plan to gradually shift to using Rust for development in the next version.

User Environment

LibC

  LibC is the bridge between applications and the operating system. DragonOS’s LibC implements some simple functions.

  • malloc heap memory allocator

  • Basic math library

  • A few simple functions related to files

  • pipe

  • fork/vfork

  • clock

  • sleep

  • printf

Shell Command Line Programs

  • Based on simple string matching parsing (not done through the compilation course’s method, so it’s simple and crude)

  • Supported commands: ls, cd, mkdir, exec, about, rmdir, rm, cat, touch, reboot

User-space Driver Programs

  • User-space keyboard driver

Source Code and Release Image Download

  You can obtain the source code in the following ways:

Get via Git

Get via DragonOS Software Mirror Site

  To solve the problem of slow and unstable access to GitHub in China, and to make it convenient for developers to download the code of each version of DragonOS, we have specially set up a mirror site. You can access the mirror site through the following address:

  You can obtain the DragonOS code archive and the compiled, runnable disk image through the mirror site.

Open Source Code Declaration

备注

To promote the healthy development of the DragonOS project, DragonOS is released under the GPLv2 open source protocol. Everyone who can obtain the DragonOS source code and related software products (including but not limited to binary copies and documents) will enjoy the rights granted by us through the GPLv2 protocol, and you must also comply with the obligations stipulated in the protocol.

This is a rather strict protocol that protects the healthy development of open source software and prevents it from being encroached upon.

For most people with good intentions, you will not violate our open source protocol.

We encourage the free spread and promotion of DragonOS, but please ensure that all actions do not infringe on the legitimate rights and interests of others, nor do they violate the GPLv2 protocol.

Please pay special attention to the fact that those who violate the open source protocol, especially commercial closed-source use and any plagiarism or academic misconduct, will be held seriously accountable. (This is the easiest scenario to violate our open source protocol.)

Also, please note that according to the requirements of the GPLv2 protocol, any software modified or developed based on DragonOS must also be open-sourced under the GPLv2 protocol and must indicate that it is based on DragonOS. It must also ensure that users of these modified versions can easily obtain the original version of DragonOS.

You must make sure that the DragonOS developers can obtain the source code of your modified version through the same way from public channels, otherwise you will violate the GPLv2 protocol.

For detailed information about the protocol, please read the LICENSE file in the root directory of the project. Please note that according to the requirements of the GPLv2 protocol, only the English original version has legal effect. Any translated version is for reference only.

Usage of Open Source Software

  During the development of DragonOS, some open source projects’ designs were referenced, or parts of their code were introduced, or they were inspired by them. Below are the list of these open source projects. We sincerely thank the contributors of these open source projects!

Format: - -

  • Linux - https://git.kernel.org/ - GPLv2

  • skiftOS - https://github.com/skiftOS/skift - MIT

  • FYSOS - https://github.com/fysnet/FYSOS - FYSOS’ License

  • LemonOS - https://github.com/LemonOSProject/LemonOS.git - BSD 2-Clause License

  • LZ4 - https://github.com/lz4/lz4 - BSD 2-Clause license

  • SerenityOS - https://github.com/SerenityOS/serenity.git - BSD 2-Clause license

  • MINE - 《A Design and Implementation of a 64-bit Operating System》Tian Yu; People’s Posts and Telecommunications Press

  • chcore - 《Modern Operating Systems: Design and Implementation》Chen Haibo, Xia Yubin; Machinery Industry Press

  • SimpleKernel - https://github.com/Simple-XX/SimpleKernel - MIT