Skip to content

Serosh-commits/Lain-os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LAIN-OS

"No matter where you are, everyone is always connected."

lain

LainOS (Abyss) is an experimental RISC-V kernel written in C. It features a temporal fracture scheduler and a predictive shell with Markov chain-based command prediction.

Features

  • Temporal Fracture Scheduler: Process scheduling based on timeline priorities
  • Predictive Shell: Tab completion using Markov chains that learn from your commands
  • Memory Management: Physical and virtual memory management with paging
  • Process Management: Full process lifecycle with fork/exec/exit
  • Virtual File System: In-memory filesystem with basic operations
  • System Calls: Standard Unix-like system call interface

Building

Requirements:

  • riscv64-unknown-elf-gcc
  • riscv64-unknown-elf-binutils
  • qemu-system-riscv64
make clean
make

Running

make run

To exit QEMU, press Ctrl+A then X.

Debugging

make debug

In another terminal:

riscv64-unknown-elf-gdb build/bin/kernel.elf
(gdb) target remote :1234
(gdb) continue

Shell Commands

  • help - Show available commands
  • neofetch - Display system information
  • ps - List running processes
  • kill <pid> - Terminate a process
  • mem - Show memory statistics
  • clear - Clear the screen
  • echo <text> - Print text
  • ascend - Trigger system state dump

Architecture

graph TD
    subgraph Hardware
        QEMU[QEMU RISC-V]
    end

    subgraph AbyssCore
        START[start.S] --> KMAIN[kmain.c]
        KMAIN --> HEAP[Heap Allocator]
        KMAIN --> PAGING[Page Tables]
    end

    subgraph Subsystems
        KMAIN --> SCHEDULER[Scheduler<br/>← temporal]
        KMAIN --> VFS[NeuroVFS]
        KMAIN --> SHELL[Predictive Shell]
        KMAIN --> EGO[Ego Containers]
    end

    subgraph Tools
        SHELL --> DECOMPILER[Live Disassembler]
        SHELL --> PATCHER[Hot Patcher]
        SHELL --> ASCENSION[Ascension Trigger]
    end

    subgraph Drivers
        KMAIN --> QUANTUM[Quantum Driver]
        QEMU --> UART[UART @ 0x10000000]
    end

    SCHEDULER -- "creates / schedules" --> PROCESSES[Processes]
    PAGING -- "maps" --> PROCESSES
    VFS -- "files" --> FILESYSTEM["/home/lain"]
    UART -->|"characters in"| SHELL
    SHELL -->|"characters out"| UART
Loading
abyss/
├── arch/riscv64/     RISC-V specific code
├── kernel/           Core kernel (processes, scheduler, syscalls)
├── mm/               Memory management
├── fs/               Filesystem
├── drivers/          Device drivers
├── shell/            Shell and Markov predictor
├── lib/              Kernel library functions
└── init/             Kernel initialization

Present Day. Present Time.

HA-HA-HA-HA-HA.

About

LainOS (codenamed Abyss) is an experimental, production-grade kernel designed to challenge traditional OS concepts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors