Skip to content
/ tosx Public

The OS eXperiment - A multi-platform C++/OOP operating system targeting small/embedded devices

License

Notifications You must be signed in to change notification settings

rghisi/tosx

Repository files navigation

TOSX - The OS eXperiment

Welcome to The OS eXperiment project, an initiative to research OS development starting simple and complicating later.

This OS is a good candidate to be the foundation for a future homebrew computer.

Goals

  • Multiplatform support - reached when running in two different archs. e.g. ARM + AVR
    • AVR 8bit microcontrollers
      • ATMega328p - 2KB RAM + 32KB FLASH
        • enough for initial experimentation, small programs and up to two or three simultaneous apps running
      • ATMega32u4 - 2.5KB RAM + 32KB FLASH
        • a bit more headroom for running apps
      • ATMega2560 - 8KB RAM + 256KB FLASH
        • starts to get interesting?
    • ARM CortexM4
      • STM32G431
      • STM32G474
      • TI LM4F120 (because it is available)
    • x86_32
      • QEMU
    • M68K
      • Sega Mega Drive/Genesis - future project
  • Multitasking
    • Cooperative (might still be possible)
    • Preemptive (now preferred)
  • Scheduling
    • Basic single level round-robin - Highly unoptimized for now :)
    • Support for async operations - e.g. I/O, time wait
  • Basic Async/Await mechanism aimed for I/O
  • Shell
    • Start new processes (blocking)
    • Start new processes (background)
    • Command line arguments to downstream processes
    • Better usability
    • More...
  • Memory Management
    • Simple Allocator
      • Doubly-linked - a bit high on overhead
      • Merging of free blocks to reduce fragmentation
      • Best-fit search to reduce fragmentation
  • Static stack allocation for tasks
  • Heap stack allocation for tasks
  • Sample apps
    • clear - clear screen
    • free - show memory stats
    • pi - calculates PI to 6digits
    • long - runs a long sleep (10s) to exercise async/await and timing
    • cdn - runs a countdown from 10, can be used to exercise multitasking
    • uptime - shows uptime since last reset (ugly output formatting)
  • Filesystem
    • Basic ROM FS
  • File support

Architecture (WIP)

  graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D;
Loading

About

The OS eXperiment - A multi-platform C++/OOP operating system targeting small/embedded devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages