Thanks to visit codestin.com
Credit goes to github.com

Skip to content

andrew-juang/FIFOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 

Repository files navigation

FIFOS β€” A Preemptive Multithreaded Mini-OS Kernel (x86, Multiboot)

FIFOS is a bare-metal educational operating system kernel built for x86, implementing:

  • Preemptive multitasking and context switching
  • Round-robin scheduling using the Programmable Interval Timer (PIT)
  • Thread creation with per-thread kernel stacks
  • GDT / IDT setup for protected-mode segmentation and interrupts
  • Fully mapped PIC (8259) + PIT (IRQ0) interrupt infrastructure
  • Minimal terminal output using VGA text mode
  • Support for hardware exceptions and software breakpoints
  • Basic coroutine/protothread-like task execution

This kernel runs without an operating system and is booted directly by GRUB using the Multiboot standard.


πŸš€ Features

Component Description
Threading system Thread Control Blocks, separate stacks, TID, runtime, status flags
Preemptive Scheduler Timer interrupt every tick, round-robin switching
Context switching Saves & restores registers, ESP, EIP, segment selectors
Interrupt Handling Fully initialized IDT, manual PIC remapping
VGA Console Low-level terminal output (no libc)
Exception testing Breakpoint interrupt (INT 3), divide-by-zero fault
Boot process Custom boot.S, Multiboot header, stack setup

🧠 How It Works

Bootloader

boot.S contains the Multiboot header consumed by GRUB. It sets up a 4KB kernel stack, saves the Multiboot pointer, and calls C code:

movl $stack+0x1000, %esp
pushl %ebx          # multiboot pointer
call init

About

A Preemptive Multithreaded Mini-OS Kernel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •