Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhuagenborn/tiny-x86-os
π½ A tiny Intel x86 operating system writtrn in assembly and C++, supporting interrupts, memory paging and heap allocation, disk control, file partition, system calls, thread scheduling, etc.
https://github.com/zhuagenborn/tiny-x86-os
assembly cpp20 disk-management interrupt kernel memory-management opertaing-system thread-scheduling
Last synced: 6 days ago
JSON representation
π½ A tiny Intel x86 operating system writtrn in assembly and C++, supporting interrupts, memory paging and heap allocation, disk control, file partition, system calls, thread scheduling, etc.
- Host: GitHub
- URL: https://github.com/zhuagenborn/tiny-x86-os
- Owner: Zhuagenborn
- License: mit
- Created: 2024-02-15T21:13:17.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T15:13:19.000Z (about 2 months ago)
- Last Synced: 2024-09-18T06:45:45.075Z (about 2 months ago)
- Topics: assembly, cpp20, disk-management, interrupt, kernel, memory-management, opertaing-system, thread-scheduling
- Language: C++
- Homepage:
- Size: 155 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# Tiny *x86* Operating System in *C++*
![C++](docs/badges/C++.svg)
![NASM](docs/badges/NASM.svg)
![Make](docs/badges/Made-with-Make.svg)
![GitHub Actions](docs/badges/Made-with-GitHub-Actions.svg)
![Linux](docs/badges/Linux.svg)
![License](docs/badges/License-MIT.svg)## Introduction
This project is a tiny *Intel x86* operating system written in *assembly* and *C++*, developed on *Ubuntu* and *Bochs*.
- Boot
- The master boot record for system startup.
- Memory
- Memory segmentation and paging.
- Virtual memory mapping based on bitmaps.
- Heap management (`std::malloc` and `std::free`) based on memory arenas.
- Interrupts
- Interrupt control based on *Intel 8259A*.
- Timer interrupts based on *Intel 8253*.
- Threads
- Thread scheduling based on timer interrupts.
- Semaphores and locks based on interrupts.
- Processes
- User processes based on *Intel x86* task state segments.
- Fork.
- Graphic
- Character printing in VGA text mode.
- Keyboard
- Keyboard control based on *Intel 8042*.
- The circular keyboard input buffer.
- Disks
- IDE channel and disk control.
- Disk partition scanning.
- File System
- File and directory management based on index nodes.
- System Calls
- Privilege switching and system calls based on interrupts.
- *C/C++*
- Basic *C/C++* standard libraries.## Contents
### Getting Started
1. [Development Environment](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Getting%20Started/Development%20Environment.md)
2. [Building the System](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Getting%20Started/Building%20the%20System.md)### Boot
3. [Master Boot Record](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Boot/Master%20Boot%20Record.md)
4. [Loader](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Boot/Loader.md)### Kernel
5. [Interrupts](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Kernel/Interrupts.md)
6. [System Calls](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Kernel/System%20Calls.md)
7. [Threads](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Kernel/Threads.md)
8. [Memory](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Kernel/Memory.md)
9. [File System](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Kernel/File%20System.md)
10. [User Processes](https://github.com/Zhuagenborn/Tiny-x86-OS/blob/main/docs/Kernel/User%20Processes.md)## References
- [*γζδ½η³»η»η豑θΏεγιι’*](https://github.com/yifengyou/os-elephant)
## Structure
```console
.
βββ CITATION.cff
βββ Debugging.md
βββ LICENSE
βββ Makefile
βββ README.md
βββ docs
βΒ Β βββ Boot
βΒ Β βΒ Β βββ Images
βΒ Β βΒ Β βΒ Β βββ loader
βΒ Β βΒ Β βΒ Β βββ memory-paging.drawio
βΒ Β βΒ Β βΒ Β βββ memory-paging.svg
βΒ Β βΒ Β βΒ Β βββ page-directory-table.drawio
βΒ Β βΒ Β βΒ Β βββ page-directory-table.svg
βΒ Β βΒ Β βββ Loader.md
βΒ Β βΒ Β βββ Master Boot Record.md
βΒ Β βββ Getting Started
βΒ Β βΒ Β βββ Building the System.md
βΒ Β βΒ Β βββ Development Environment.md
βΒ Β βββ Kernel
βΒ Β βΒ Β βββ File System.md
βΒ Β βΒ Β βββ Images
βΒ Β βΒ Β βΒ Β βββ file-system
βΒ Β βΒ Β βΒ Β βΒ Β βββ directory-entries.drawio
βΒ Β βΒ Β βΒ Β βΒ Β βββ directory-entries.svg
βΒ Β βΒ Β βΒ Β βΒ Β βββ index-node.drawio
βΒ Β βΒ Β βΒ Β βΒ Β βββ index-node.svg
βΒ Β βΒ Β βΒ Β βββ memory
βΒ Β βΒ Β βΒ Β βΒ Β βββ memory-heap.drawio
βΒ Β βΒ Β βΒ Β βΒ Β βββ memory-heap.svg
βΒ Β βΒ Β βΒ Β βΒ Β βββ memory-pools.drawio
βΒ Β βΒ Β βΒ Β βΒ Β βββ memory-pools.svg
βΒ Β βΒ Β βΒ Β βββ threads
βΒ Β βΒ Β βΒ Β βββ thread-block.drawio
βΒ Β βΒ Β βΒ Β βββ thread-block.svg
βΒ Β βΒ Β βΒ Β βββ thread-lists.drawio
βΒ Β βΒ Β βΒ Β βββ thread-lists.svg
βΒ Β βΒ Β βΒ Β βββ thread-switching.drawio
βΒ Β βΒ Β βΒ Β βββ thread-switching.svg
βΒ Β βΒ Β βββ Interrupts.md
βΒ Β βΒ Β βββ Memory.md
βΒ Β βΒ Β βββ System Calls.md
βΒ Β βΒ Β βββ Threads.md
βΒ Β βΒ Β βββ User Processes.md
βΒ Β βββ badges
βΒ Β βββ C++.svg
βΒ Β βββ License-MIT.svg
βΒ Β βββ Linux.svg
βΒ Β βββ Made-with-GitHub-Actions.svg
βΒ Β βββ Made-with-Make.svg
βΒ Β βββ NASM.svg
βββ include
βΒ Β βββ boot
βΒ Β βΒ Β βββ boot.inc
βΒ Β βββ kernel
βΒ Β βΒ Β βββ debug
βΒ Β βΒ Β βΒ Β βββ assert.h
βΒ Β βΒ Β βββ descriptor
βΒ Β βΒ Β βΒ Β βββ desc.h
βΒ Β βΒ Β βΒ Β βββ desc.inc
βΒ Β βΒ Β βΒ Β βββ gdt
βΒ Β βΒ Β βΒ Β βββ idx.h
βΒ Β βΒ Β βΒ Β βββ tab.h
βΒ Β βΒ Β βββ interrupt
βΒ Β βΒ Β βΒ Β βββ intr.h
βΒ Β βΒ Β βΒ Β βββ pic.h
βΒ Β βΒ Β βββ io
βΒ Β βΒ Β βΒ Β βββ disk
βΒ Β βΒ Β βΒ Β βΒ Β βββ disk.h
βΒ Β βΒ Β βΒ Β βΒ Β βββ disk.inc
βΒ Β βΒ Β βΒ Β βΒ Β βββ file
βΒ Β βΒ Β βΒ Β βΒ Β βΒ Β βββ dir.h
βΒ Β βΒ Β βΒ Β βΒ Β βΒ Β βββ file.h
βΒ Β βΒ Β βΒ Β βΒ Β βΒ Β βββ inode.h
βΒ Β βΒ Β βΒ Β βΒ Β βΒ Β βββ super_block.h
βΒ Β βΒ Β βΒ Β βΒ Β βββ ide.h
βΒ Β βΒ Β βΒ Β βββ file
βΒ Β βΒ Β βΒ Β βΒ Β βββ dir.h
βΒ Β βΒ Β βΒ Β βΒ Β βββ file.h
βΒ Β βΒ Β βΒ Β βΒ Β βββ path.h
βΒ Β βΒ Β βΒ Β βββ io.h
βΒ Β βΒ Β βΒ Β βββ keyboard.h
βΒ Β βΒ Β βΒ Β βββ timer.h
βΒ Β βΒ Β βΒ Β βββ video
βΒ Β βΒ Β βΒ Β βββ console.h
βΒ Β βΒ Β βΒ Β βββ print.h
βΒ Β βΒ Β βΒ Β βββ print.inc
βΒ Β βΒ Β βββ krnl.h
βΒ Β βΒ Β βββ krnl.inc
βΒ Β βΒ Β βββ memory
βΒ Β βΒ Β βΒ Β βββ page.h
βΒ Β βΒ Β βΒ Β βββ page.inc
βΒ Β βΒ Β βΒ Β βββ pool.h
βΒ Β βΒ Β βββ process
βΒ Β βΒ Β βΒ Β βββ elf.inc
βΒ Β βΒ Β βΒ Β βββ proc.h
βΒ Β βΒ Β βΒ Β βββ tss.h
βΒ Β βΒ Β βββ selector
βΒ Β βΒ Β βΒ Β βββ sel.h
βΒ Β βΒ Β βΒ Β βββ sel.inc
βΒ Β βΒ Β βββ stl
βΒ Β βΒ Β βΒ Β βββ algorithm.h
βΒ Β βΒ Β βΒ Β βββ array.h
βΒ Β βΒ Β βΒ Β βββ cerron.h
βΒ Β βΒ Β βΒ Β βββ cmath.h
βΒ Β βΒ Β βΒ Β βββ cstddef.h
βΒ Β βΒ Β βΒ Β βββ cstdint.h
βΒ Β βΒ Β βΒ Β βββ cstdlib.h
βΒ Β βΒ Β βΒ Β βββ cstring.h
βΒ Β βΒ Β βΒ Β βββ iterator.h
βΒ Β βΒ Β βΒ Β βββ mutex.h
βΒ Β βΒ Β βΒ Β βββ semaphore.h
βΒ Β βΒ Β βΒ Β βββ source_location.h
βΒ Β βΒ Β βΒ Β βββ span.h
βΒ Β βΒ Β βΒ Β βββ string_view.h
βΒ Β βΒ Β βΒ Β βββ type_traits.h
βΒ Β βΒ Β βΒ Β βββ utility.h
βΒ Β βΒ Β βββ syscall
βΒ Β βΒ Β βΒ Β βββ call.h
βΒ Β βΒ Β βββ thread
βΒ Β βΒ Β βΒ Β βββ sync.h
βΒ Β βΒ Β βΒ Β βββ thd.h
βΒ Β βΒ Β βββ util
βΒ Β βΒ Β βββ bit.h
βΒ Β βΒ Β βββ bitmap.h
βΒ Β βΒ Β βββ block_queue.h
βΒ Β βΒ Β βββ format.h
βΒ Β βΒ Β βββ metric.h
βΒ Β βΒ Β βββ metric.inc
βΒ Β βΒ Β βββ tag_list.h
βΒ Β βββ user
βΒ Β βββ io
βΒ Β βΒ Β βββ file
βΒ Β βΒ Β βΒ Β βββ dir.h
βΒ Β βΒ Β βΒ Β βββ file.h
βΒ Β βΒ Β βββ video
βΒ Β βΒ Β βββ console.h
βΒ Β βββ memory
βΒ Β βΒ Β βββ pool.h
βΒ Β βββ process
βΒ Β βΒ Β βββ proc.h
βΒ Β βββ stl
βΒ Β βΒ Β βββ cstdint.h
βΒ Β βββ syscall
βΒ Β βββ call.h
βββ src
βββ boot
βΒ Β βββ loader.asm
βΒ Β βββ mbr.asm
βββ kernel
βΒ Β βββ debug
βΒ Β βΒ Β βββ assert.cpp
βΒ Β βββ descriptor
βΒ Β βΒ Β βββ desc.asm
βΒ Β βΒ Β βββ gdt
βΒ Β βΒ Β βββ tab.cpp
βΒ Β βββ interrupt
βΒ Β βΒ Β βββ intr.asm
βΒ Β βΒ Β βββ intr.cpp
βΒ Β βΒ Β βββ pic.cpp
βΒ Β βββ io
βΒ Β βΒ Β βββ disk
βΒ Β βΒ Β βΒ Β βββ disk.cpp
βΒ Β βΒ Β βΒ Β βββ file
βΒ Β βΒ Β βΒ Β βΒ Β βββ dir.cpp
βΒ Β βΒ Β βΒ Β βΒ Β βββ file.cpp
βΒ Β βΒ Β βΒ Β βΒ Β βββ inode.cpp
βΒ Β βΒ Β βΒ Β βΒ Β βββ super_block.cpp
βΒ Β βΒ Β βΒ Β βββ ide.cpp
βΒ Β βΒ Β βΒ Β βββ part.cpp
βΒ Β βΒ Β βββ file
βΒ Β βΒ Β βΒ Β βββ dir.cpp
βΒ Β βΒ Β βΒ Β βββ file.cpp
βΒ Β βΒ Β βΒ Β βββ path.cpp
βΒ Β βΒ Β βββ io.asm
βΒ Β βΒ Β βββ io.cpp
βΒ Β βΒ Β βββ keyboard.cpp
βΒ Β βΒ Β βββ timer.cpp
βΒ Β βΒ Β βββ video
βΒ Β βΒ Β βββ console.cpp
βΒ Β βΒ Β βββ print.asm
βΒ Β βΒ Β βββ print.cpp
βΒ Β βββ krnl.cpp
βΒ Β βββ main.cpp
βΒ Β βββ memory
βΒ Β βΒ Β βββ page.asm
βΒ Β βΒ Β βββ page.cpp
βΒ Β βΒ Β βββ pool.cpp
βΒ Β βββ process
βΒ Β βΒ Β βββ proc.cpp
βΒ Β βΒ Β βββ tss.asm
βΒ Β βΒ Β βββ tss.cpp
βΒ Β βββ stl
βΒ Β βΒ Β βββ cstring.cpp
βΒ Β βΒ Β βββ mutex.cpp
βΒ Β βΒ Β βββ semaphore.cpp
βΒ Β βββ syscall
βΒ Β βΒ Β βββ call.asm
βΒ Β βΒ Β βββ call.cpp
βΒ Β βββ thread
βΒ Β βΒ Β βββ sync.cpp
βΒ Β βΒ Β βββ thd.asm
βΒ Β βΒ Β βββ thd.cpp
βΒ Β βββ util
βΒ Β βββ bitmap.cpp
βΒ Β βββ format.cpp
βΒ Β βββ tag_list.cpp
βββ user
βββ io
βΒ Β βββ file
βΒ Β βΒ Β βββ dir.cpp
βΒ Β βΒ Β βββ file.cpp
βΒ Β βββ video
βΒ Β βββ console.cpp
βββ memory
βΒ Β βββ pool.cpp
βββ process
βββ proc.cpp
```## License
Distributed under the *MIT License*. See `LICENSE` for more information.