how do i always forget about the readme

This commit is contained in:
maksw authored and Maksymilian Wilczynski committed 2026-08-20 22:28:04 +02:00
1 parent f882d339fb
commit 3dacbd32c8
2 files changed
+53 -53

No files matched your search

Binary file not shown.
+53 -53
View File
@@ -8,45 +8,30 @@
NT-Lite is a 64-bit operating system kernel written from scratch. NT-Lite is a 64-bit operating system kernel written from scratch.
It boots into a shell, loads drivers, launches programs, survives application crashes, runs Doom, plays video, talks TCP/IP, and occasionally reminds you that it is still a hobby kernel. It boots into a shell, launches programs, runs Doom, talks TCP/IP, and occasionally reminds you that it is still a hobby kernel.
The codebase is small enough to understand, but no longer small enough to pretend it is just a weekend project.
## features ## features
- UEFI bootloader - UEFI bootloader
- real SMP - real SMP
- physical and virtual memory managers - VAD-based virtual memory, file-backed and anonymous mmap, CoW, reclaim
- kernel pool and user heap
- single address-space design with user/supervisor page permissions - single address-space design with user/supervisor page permissions
- HAL split from the kernel
- preemptive priority scheduler - preemptive priority scheduler
- processes and threads - capability-style handles with rights checks, derivation, and revocation
- per-process handles with rights checks - rich synchronization primitives
- process exit state, reaping, and restartable init services
- events, semaphores, mutexes, queues, named queues, and alertable waits
- IRQL, DPCs, kernel APCs, and user APCs - IRQL, DPCs, kernel APCs, and user APCs
- native user-mode exception dispatch - user exception handling with structured and vectored handlers
- Win32 vectored exception handlers
- minimal runtime-registered SEH substrate
- async file I/O with events, IOSBs, APC callbacks, and cancellation - async file I/O with events, IOSBs, APC callbacks, and cancellation
- VFS with IRPs - capability-relative VFS with IRPs
- refcounted mounted volumes with partition arrival/removal
- page cache with dirty writeback and invalidation - page cache with dirty writeback and invalidation
- AHCI driver, interrupt-driven - USB bus, xHCI, mass storage, hubs, hotplug, and HID
- IDE driver, PIO/DMA - audio
- FAT32 filesystem driver with VFAT long names
- USB bus, xHCI, mass storage, and HID
- VMware SVGA display driver - VMware SVGA display driver
- drive-number paths such as `0:/apps/shell.exe` - dynamic driver loading
- PE import resolution and dynamic `.sys` driver loading
- modular networking through lwIP
- RTL8139 and RTL816x network drivers
- native BSD-ish socket syscalls - native BSD-ish socket syscalls
- DNS resolver syscall - DNS resolver syscall
- length-tracked string-view syscall ABI - four-register syscall ABI with sized request structs for larger calls
- request-struct based syscalls for larger calls
- native `NTLSTATUS_*` status codes
- INI-based configuration
- partial Win32 personality - partial Win32 personality
- partial (microsoft-level) POSIX personality - partial (microsoft-level) POSIX personality
- Doom - Doom
@@ -56,18 +41,20 @@ The codebase is small enough to understand, but no longer small enough to preten
## paths ## paths
You thought it would be easy, would you?
```text ```text
"apps/shell.exe" -> current working directory "apps/shell_native.exe" -> current working directory, resolved in userspace
"0:/apps/shell.exe" -> volume 0, native path; works everywhere "/SystemRoot/apps/shell_native.exe" -> system volume through the resource namespace
"2:/data/config.ini" -> volume 2, native path "/Device/HarddiskVolume1/boot.ini" -> system volume through the resource namespace
"C:\apps\doom.exe" -> volume 0 through win32.dll; C: maps to 0:, D: maps to 1:, etc. "C:\apps\doom.exe" -> /SystemRoot/apps/doom.exe through win32.dll
"/apps/video.exe" -> volume 0 through posix.dll "\apps\doom.exe" -> /SystemRoot/apps/doom.exe through win32.dll
"/1/apps/video.exe" -> volume 1 through posix.dll "/apps/video.exe" -> /SystemRoot/apps/video.exe through posix.dll
``` ```
Volumes `0`-`7` are available. A volume only works if a filesystem is registered on it. Kernel filesystem syscalls are capability-relative; userspace owns the current working directory and resolves named resources through `rssrv`.
The Win32 personality translates drive letters to volume numbers. The POSIX personality maps volumes into a tree. `/SystemRoot` is the configured boot volume. Other mounted volumes are discovered through the volume manager and opened by capability.
## networking ## networking
@@ -75,7 +62,7 @@ The socket syscalls are BSD-shaped, not BSD-compatible. Same nouns (AF_INET, SOC
one fixed-size tagged address struct instead of the sockaddr_in/sockaddr_storage casting dance, one fixed-size tagged address struct instead of the sockaddr_in/sockaddr_storage casting dance,
no htons/ntohl conversions, and DNS resolution is a syscall rather than a userspace library call. no htons/ntohl conversions, and DNS resolution is a syscall rather than a userspace library call.
That's right microkernel purists, cry some more. Ergonomics. That's right microkernel purists, cry some more. Ergonomics.
Async is first-class here too, same machinery as the filesystem. Async is first-class here too, same machinery as the filesystem. Except the DNS resolver. Ergonomics, am I right?
## how to build ## how to build
@@ -91,40 +78,56 @@ Async is first-class here too, same machinery as the filesystem.
## how it looks when built ## how it looks when built
The ESP is just the boot anchor:
```text ```text
efi/boot/ efi/boot/
bootx64.efi bootx64.efi
efi/ntlite/fs/
...
boot.ini boot.ini
drivers/ ```
drivers.ini
ahci.sys The configured system volume carries the OS:
ata.sys
fat32.sys ```text
lwip.sys
pci.sys
ps2.sys
rtl816x.sys
rtl8139.sys
usb.sys
vmwaresvga.sys
system/ system/
colonel.exe colonel.exe
hal.dll hal.dll
init.exe init.exe
rssrv.exe
syscall.dll syscall.dll
win32.dll win32.dll
posix.dll posix.dll
settings.ini
drivers/
drivers.ini
ahci.sys
ata.sys
fat.sys
hda.sys
lwip.sys
ntfs.sys
pci.sys
ps2.sys
rtl816x.sys
rtl8139.sys
serial.sys
usb.sys
vmwaresvga.sys
apps/ apps/
shell_native.exe shell_native.exe
shell_win32.exe shell_win32.exe
shell_posix.exe shell_posix.exe
doom.exe doom.exe
video.exe video.exe
edit.exe
httpget.exe httpget.exe
tcpserve.exe tcpserve.exe
udp.exe udp.exe
resolve.exe resolve.exe
ping.exe ping.exe
memtop.exe
``` ```
## screenshots ## screenshots
@@ -167,10 +170,10 @@ Q: Does it really have SMP?
A: Watch out. It bites. A: Watch out. It bites.
Q: Is the Win32 layer real? Q: Is the Win32 layer real?
A: Depends how you frame it. Real apps won't run but specifically prepared ones will. A: API wise, yes. Binary compatibility wise, close but no.
Q: Are processes isolated? Q: Are processes isolated?
A: No. But IPC is free. Is this how a serious modern OS should isolate processes? No. A: No. But IPC is free. And you can't steal handles. Is this how a serious modern OS should isolate processes? No.
Are we a serious OS? No. Is it very convenient? Absolutely. Are we a serious OS? No. Is it very convenient? Absolutely.
Q: How often does it crash? Q: How often does it crash?
@@ -180,7 +183,7 @@ Q: Can it recover from a crash?
A: Works on my machine. A: Works on my machine.
Q: Is this finished? Q: Is this finished?
A: It will be once I get a job. A: Does it look finished?
Q: Will it corrupt my data? Q: Will it corrupt my data?
A: It shouldn't. A: It shouldn't.
@@ -188,9 +191,6 @@ A: It shouldn't.
Q: Why is the path syntax so weird? Q: Why is the path syntax so weird?
A: It makes sense to me. A: It makes sense to me.
Q: Why both Win32 and POSIX?
A: NT could do it, why can't I?
Q: Why are the logs so verbose? Q: Why are the logs so verbose?
A: Try debugging an interrupt path with vibes. A: Try debugging an interrupt path with vibes.