r/kerneldevelopment • • Jul 15 '26 Heartwarming

I've made a microkernel (and an OS using it) in C for ARM devices!

19 Upvotes

Meet the first version of zuzu, a microkernel I have been making for a year now. zuzu is a microkernel, so it's a very small kernel that has rendezvous IPC, memory management, interrupt handling/forwarding, asynchronous notification objects, and a capability system for security. It is paired with zuzuOS, the operating system that is centered around the zuzu kernel. Everything else, including drivers are managed entirely in userspace.

The first version is codenamed Loaf, so its full name is zuzu Loaf. I am actively looking for contributions, testers and reviews, so your help would be much appreciated! Documentation will be put in this website soon: https://kagantmr.github.io/zuzu-docs/index.html

Check out the GitHub repository and zuzuOS v0.5.0: https://github.com/kagantmr/zuzu


r/kerneldevelopment • • Apr 27 '26

A webpage hosted on Ethereal

Thumbnail gallery
19 Upvotes

r/kerneldevelopment • • Jan 21 '26

Just For Fun What was your first port?

19 Upvotes

Just curious :D

or rather :D™ Mr. Banan xD


r/kerneldevelopment • • Dec 23 '25

Quick OSDev Survey

19 Upvotes

This is a quick and easy survey (mostly multiple choice, one of which you can write for) about OS Development, so I can get a better clue of the OS Development world and what is the most commonly targeted hardware and how the OS is designed.

https://forms.gle/qTkvvgMiksZa4dWb6


r/kerneldevelopment • • Oct 07 '26

Showcase MONOLITH

18 Upvotes

Introducing MONOLITH, my operating system that I worked on for the past two years, supports both x86 and x86_64, privilege separation, preemptive multitasking, SMP, loading user processes, a desktop environment running in user space, and most importantly it can run Doom!

Feel free to check it!

https://github.com/mrunix00/MONOLITH


r/kerneldevelopment • • Dec 29 '25

Showcase Finally ported DOOM!

Thumbnail
reddit.com
18 Upvotes

r/kerneldevelopment • • Oct 09 '25

Discussion Why? Just for Fun

Thumbnail
oshub.org
18 Upvotes

r/kerneldevelopment • • Jun 12 '26

Question Some difficulties with trampoline code and linking.

Post image
17 Upvotes

r/kerneldevelopment • • Oct 01 '25

The CharlotteOS Kernel

Thumbnail
github.com
17 Upvotes

Not fancy screenshots for you because there is no GUI yet...


r/kerneldevelopment • • Jun 02 '26

Custom kernel developed from scratch.

Thumbnail
github.com
16 Upvotes

For the past couple months I have been working on a custom open-source Unix like kernel built from the ground up in C and ASM, im looking for some feedback! Feel free to contribute to clone and reuse the code in this project!


r/kerneldevelopment • • Oct 03 '25

OS design

16 Upvotes

I'm quite new in osdev and i just made my first kernel with some drivers but now i want to make a userspace but i don't know should i seperate userspace and kernelspace or should i combine these two so just the kernel with a desktop with window system

and what should i do first in the userspace i never made a userspace


r/kerneldevelopment • • 19d ago

Question How to improve myself to be a better amateur kernel developer?

15 Upvotes

Hi friends, this is not a typical "How do I start" question, so please hear me out.

# Beginning of Context

I have gone through all xv6 MIT labs and completed some of the optional lab contents earlier this year (about early Feb). I then studied this course (https://linux-kernel-labs.github.io/refs/heads/master/index.html) for another month and finished the first half.

Professionally, I work as a data engineer so I never had any lower level professional experience. I worked on a few other amateur projects like interpreters.

# End of Context

Since then I have been trying to work on my own projects. However none of them went well. I work very well within the boundary of a course with well defined labs and tests, like the two mentioned above, but once I tried to do something on my own, I struggled to move forward. One example is adding VFS into xv6.

I will try to describe what was exactly blocking me — there are a few reasons.

First, I definitely lack the technical skills —- this is not surprising as that’s why I’m learning.

Second, and the more important one —- I realized that in general, even in my life, I’m more accustomed to do what others tell me than making my own calls —- regarding these failed projects, I was struggling with the uncertainty and was not good at researching unknowns without guidelines. It is not that I could not decompose the big objective into smaller ones, but I was easily exhausted by the uncertainty and lack of progression if I’m stuck for more than a month. I might have branched too far away in my research as well.

I definitely need to improve my grit because a month of study is not a lot of time, and if I can’t improve it I probably should stay away from any serious kernel work. Other than that, I’m wondering if you have been in the same shoes, and how did you improve yourself gradually to be comfortable about working on your own kernel projects?

Thanks in advance.


r/kerneldevelopment • • Jun 25 '26

I finally got an AC'97 driver working in BoredOS!

15 Upvotes

r/kerneldevelopment • • Jan 28 '26

I wrote a task viewer for my kernel - The Bleed Kernel

15 Upvotes

Feedback Appreciated!

I wrote a task viewer for my kernel and i implemented task names

(if a task is formed from a function it is explicitly specified such as "reaper" if the task is a running program it uses the program file name)

kernels website: bleed-kernel website

kernels source: Bleed-Kernel on Codeberg


r/kerneldevelopment • • Jul 07 '26

Managarm: DMA remapping with Intel IOMMUs

Thumbnail managarm.org
14 Upvotes

r/kerneldevelopment • • Dec 16 '25

Resource: example multiboot stub for a 64-bit kernel

14 Upvotes

People occasionally ask about how to use multiboot together with a 64-bit kernel (multiboot requires a 32-bit entry point). So, I've put together a well-documented example that might be useful.

https://github.com/davmac314/multiboot-kernel64/tree/main

Although multiboot is somewhat outdated, it is still widely supported; for example, Qemu can boot multiboot kernels directly, without requiring creation of a disk image, which can be handy during development.


r/kerneldevelopment • • Jun 10 '26

Best Place to Find Kernel/Embedded Roles?

13 Upvotes

Hey all! Looking to break into the kernel or embedded space and curious to get some opinions on the best places to find those jobs? I feel like LinkedIn and Indeed are lacking in these areas. For context, I have 3 yoe as a backend software engineer.


r/kerneldevelopment • • Nov 12 '25

Made a x86_32 bootloader in Rust

Thumbnail reddit.com
13 Upvotes

r/kerneldevelopment • • Oct 04 '25

So you've run Doom on your OS

Thumbnail reddit.com
13 Upvotes

r/kerneldevelopment • • Sep 21 '26

NATALIZIOOS “Architecture and Development of an x86 Operating System”

Thumbnail
gallery
12 Upvotes

September 2023 - present
A personal research and development project, started in September 2023, dedicated to the independent design and development of NATALIZIOOS, a experimental operating system for 32-bit x86 architectures. The project covers the entire basic operating system architecture: from the BIOS boot chain and kernel loading to memory management, interrupts, timers, hardware drivers, filesystems, the shell, and graphics services. The implementation includes a freestanding monolithic kernel with physical memory management, paging, kernel heap, framebuffer, PS/2 input, ATA storage, PCI detection, RTC, JART, speaker, diagnostic logging, RAMFS, and N.A.T.FS. I also designed and integrated firmware components, bootable images, diagnostic tools, and a compilation and verification pipeline based on C, x86 assembly, Python, NASM, Clang, GNU Make, and QEMU. The graphics subsystem includes a local Objective-C runtime, class and selector management, message dispatch, objc_msgSend in x86 assembly, and a view- and window-based application model with direct framebuffer rendering. The project includes three desktop environments with different purposes: two for demonstration purposes and a third, still in the prototype phase, dedicated to veritying the object-oriented graphics architecture. The v0.2.5.33 release includes 99,980 lines of analyzed source code, a 519,804-byte graphics kernel, complete and lightweight firmware paths, and verified bootable images in QEMU. NATALIZIOOS represents a continuous path of development in operating systems, computer architecture, system programming, firmware development, and low-level software engineering. The project is proprietary and intended for study, research, experimentation and technical demonstration purposes.


r/kerneldevelopment • • May 01 '26

DragonWare - Microkernel x86 operating system (Release v0.0.1)

12 Upvotes

r/kerneldevelopment • • Apr 28 '26

PatchworkOS: Making Reduct (previously SCON), a language for scripting and configuration within PatchworkOS, and accidentally faster than Lua, now available as its own project.

12 Upvotes

So I got distracted again. I've been working on the new desktop interface for PatchworkOS; what I noticed rather early is that to create a modern looking UI, a pure, C-based API is simply not good enough, writing even a basic UI becomes a pain.

Why?

The obvious solution was to create a minimal programming language that could act as an HTML/CSS style markup language. Since SCON was already being used for component manifests, adding a few more features to it was another obvious choice.

What?

As part of this process I was reading up on language design and came across too many good ideas that I simply had to add. Eventually, I made the decision to turn SCON into its own project, which was renamed to Reduct.

Reduct is a functional, immutable, S-expression based configuration and scripting language. It aims to combine the flexibility of a Lisp with the ease-of-use and performance of a language like Lua. All within a C99 header-only library.

If you are curious and want to know more, then feel free to check out the GitHub! But I will go over some stuff in this post as well.

Syntax

Lisps, which Reduct takes heavy inspiration from, are generally agreed to be a very powerful style of language and yet are frequently criticized for their poor readability.

The most often blamed source of this poor readability is the sheer volume of parentheses.

Reduct makes the argument that most of these complaints are due to nesting, not parentheses; that it can be solved via infix notation, banning let and a more modern style guide.

Included are three examples of a basic program written in common Lisp C, and Reduct.

Lisp

(let ((x 10)
      (y 20))
  (let ((z (+ x y)))
    (* z 2)))

C

int main()
{
    int x = 10;
    int y = 20;
    int z = x + y;
    return z * 2;
}

Reduct

(do
    (def x 10)
    (def y 20)
    (def z {x + y})
    {z * 2}
)

Note how in Reduct the use of curly braces for infix notation and the def intrinsic for scoped definitions allows for a more familiar, imperative-like structure while remaining entirely functional, and S-expression based.

How?

Reduct is implemented as a register-based bytecode language, where the Reduct source is first parsed into an Abstract Syntax Tree (AST) and then compiled into a custom bytecode format before being executed by the virtual machine/evaluator.

Note that the "Abstract Syntax Tree" is just a Reduct expression, lists and atoms, meaning that the compiler is itself written to operate on the same data structures as the evaluator produces.

The bytecode format itself is a stream of 32bit instructions, with all instructions able to read/write to an array of registers, or read from an array of constants.

See inst.h for more information on instructions.

Since Reduct is immutable, the constants array is also used for "captured" values from outer scopes (closures) and we can also allow the compiler to fold constant expressions at compile-time, far more than would normally be possible.

See compile.h for more information on the compiler.

To improve caching and reduce pointer indirection, Reduct uses "handles" (reduct_handle_t) which are Tagged Pointers using NaN boxing to allow a single 64bit value to store either a 48 bit signed integer, IEEE 754 double or a pointer to a heap allocated item.

See handle.h for more information on handles.

Items (reduct_item_t) represent all heap allocated objects, such as lists, atoms and closures. All items are exactly 64 bytes in size and allocated using a custom pool allocator and freed using a garbage collector and free list.

Since Reduct uses its handles to store most integers and floats, it can avoid heap allocations for many common values, significantly reducing the pressure on the garbage collector and improving caching.

See item.h for more information on items.

Lists are implemented as a "bit-mapped vector trie", providing $O(log_{w} n)$ access, insertion, and deletion, where $w$ is the width of each node in the trie.

See list.h for more information on lists.

All atoms use String Interning, meaning that every unique atom is only stored once in memory. This makes any string comparison into a single pointer comparison, and it means that parsing the integer/floating point value of an atom or an items truthiness only needs to be done once.

See atom.h for more information on atoms.

Many additional optimization techniques are used, for example, Computed Gotos, setjmp based error handling to avoid excessive error checking in the hot path, Tail Call Optimization and much more.

See eval.h for more information on the evaluator.

Benchmarks

Included below are a handful of benchmarks comparing Reduct with python 3.14.3 and Lua 5.4.8 using hyperfine, all benchmarks were performed in Fedora 43 (6.19.11-200.fc43.x86_64).

Fib35

Finds the 35th Fibonacci number without tail call optimization.

CommandMean [ms]Min [ms]Max [ms]Relative
reduct bench/fib35.rdt550.2 ± 11.0535.5572.81.00
lua bench/fib35.lua826.8 ± 38.6769.7900.21.50 ± 0.08
python bench/fib35.py1109.4 ± 14.71085.31136.02.02 ± 0.05

For this benchmark, memory usage was also tracked using heaptrack:

CommandPeak Memory [MB]
reduct bench/fib35.rdt0.097
lua bench/fib35.lua0.099
python bench/fib35.py1.8

Fib65

Finds the 65th Fibonacci number with tail call optimization.

CommandMean [µs]Min [µs]Max [µs]Relative
reduct bench/fib65.rdt613.9 ± 90.6535.13310.01.00
lua bench/fib65.lua1049.5 ± 165.0920.32663.31.71 ± 0.37
python bench/fib65.py13155.4 ± 1254.211688.323926.921.43 ± 3.76

Brainfuck

A simple jump-table optimized Brainfuck interpreter that runs a "Hello World!" program.

This benchmark also acts as a fun Turing completeness proof.

CommandMean [µs]Min [µs]Max [µs]Relative
reduct bench/brainfuck.rdt794.3 ± 101.8720.61779.71.00
lua bench/brainfuck.lua1112.1 ± 146.51022.62359.51.40 ± 0.26

For this benchmark, memory usage was also tracked using heaptrack:

CommandPeak Memory [MB]
reduct bench/brainfuck.rdt0.185
lua bench/brainfuck.lua0.102

Mandelbrot

Outputs an 80 by 40 visualization of the Mandelbrot set with 10000 iterations.

CommandMean [ms]Min [ms]Max [ms]Relative
reduct bench/mandelbrot.rdt330.7 ± 8.3318.0347.31.00
lua bench/mandelbrot.lua369.2 ± 14.3356.5403.31.12 ± 0.05

See the Benchmarks for more information.

There is still plenty of room for further improvement, as always, I'd gladly hear any suggestions or issues that anyone may have!


This is a cross-post from GitHub Discussions.


r/kerneldevelopment • • Nov 03 '25

Managarm now available on os-test

Thumbnail managarm.org
12 Upvotes

r/kerneldevelopment • • Oct 02 '25

Showcase - Kernel The Unite Real Time Operating System · Jacques Mattheij

Thumbnail jacquesmattheij.com
12 Upvotes

r/kerneldevelopment • • Oct 20 '25

Discussion Kernel Development [Open Discussion]

11 Upvotes

To begin, I set the flair as discussion but there are some questions I would like assistance with as well...

Backstory:

I've finished a rough custom BIOS chainloader and UEFI bootloader that works on x86 and x86_64 architectures. At the moment I would consider my BIOS chainloader to be i386+ (probably more around the i686 era).

Currently my BIOS chainloader can locate its core extension image from a MBR or GPT medium and load the extension image into memory (real-mode) from a FAT12, FAT16, and FAT32 (even including the ESP which is FAT32). The idea was to make a legacy and future compatible BIOS chainloader if I wanted to test on older hardware or hardware that is UEFI 1 rate or higher (EFI 1 is a mix of EFI and BIOS more BIOS, EFI 2 is a 50/50 general mix of BIOS and EFI, and EFI 3 is EFI with BIOS core support?)... the core of the extension image is to handle FAT filesystems, I/O and some PCI devices, and video support (VESA) and generate a system descriptor table (similar to a multiboot 1 header passed to a kernel with some added functionality/pointers to connected devices or supported services). This is the 32-bit chainloader, if 64-bit (long) mode is accessible then an altered system descriptor table (same as the first table but more oriented to a multiboot 2 header) is passed to a kernel image. The EFI bootloader does the same core functions as the BIOS portion with added security protocols (kill running "racing services" check validity of GPT and extension/drivers for corruption or runtime code injections not allowed)...

Topic/Discussion of Post:

I have completed the entry services for a kernel and will follow the path of a Hyrbid Kernel (microkernel as the core for core functionality, and the monolithic kernel design by loading drivers after core checks for connected hardware or supported services on top of the microkernel) if the design is feasible. At this time I've run into a roadblock... I plan to have multiple kernel images (microkernels) to support x86 (BIOS and UEFI, which is two separate images) and a x86_64 (BIOS and UEFI, which is another two separate kernel images). In total I would have four total microkernels which also have GRUB and GRUB2 support embedded functionality for each architecture as well...

My questions are as follows:

1.) Should I combine the BIOS and EFI portions into one kenerl image per architecture or leave as my road map is laid out (having an image that handles just BIOS+GRUB/GRUB2 and EFI+GRUB/GRUB2)?

2.) How quickly will I pollute my boot partition with this design (I currently have reserved a minimum of 512MBs to a maximum of 4GB if boot partition is a separate partition of the userland partition, otherwise the size of userland is the maximum size of the boot partition)?

3.) Is this design plan optimal?

4.) What functionalities should be included in my microkernel without being a separate loaded driver/service and becoming monolithic (imo, I would want video, basic peripherals, console I/O, and drive support through I/O)?