diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-09-10 13:52:22 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-09-10 13:52:22 +0200 |
| commit | fcc2527351589b6e3a85e88d01f1d310165aa8af (patch) | |
| tree | cc7e5c813eaad5f9d745574d74d656857461d9b5 /README.rst | |
| parent | faebda2a8255b18b7a8b341b365e8cfecffe8882 (diff) | |
| download | kernel-fcc2527351589b6e3a85e88d01f1d310165aa8af.tar.xz kernel-fcc2527351589b6e3a85e88d01f1d310165aa8af.zip | |
docs: add size estimates to project ideas
Diffstat (limited to 'README.rst')
| -rw-r--r-- | README.rst | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -166,6 +166,7 @@ These projects should be approached sequentially or as a joint effort: - *Scope*: Design a Thread Control Block (TCB) and Process Control Block (PCB) structure. Implement low-level stack setup and context switching in assembly for the active CPU. - *Extension*: Develop a task scheduler (e.g., Round-Robin, Priority-based, or Multi-Level Feedback Queue) utilizing the local APIC timer for preemptive multitasking. + - *Size*: Reducing the scheduling to only support cooperative task switches would likely be suitable to a semester thesis, otherwise this has bachelor's thesis size. 2. **User Mode Isolation and System Call Interface**: @@ -173,6 +174,7 @@ These projects should be approached sequentially or as a joint effort: - *Scope*: Implement user-kernel privilege transitions (Ring 3 to Ring 0) utilizing platform-specific instructions. Configure page tables to separate user space virtual memory from the higher-half kernel mapping. - *Extension*: Establish a system call dispatcher routing file and memory operations from user space to the corresponding `kapi/ <kapi>`_ implementations. - *Extension*: Load and execute an ELF64 binary as the first user-space process. TeachOS already includes an ELF structure parser (`elf <libs/elf>`_), but it only reads headers and sections today — loading segments into a process address space and transferring control to them does not exist yet. + - *Size*: At least one, likely two bachelor's theses, especially considering syscalls and elf loading. Interrupt Routing, Multi-Core Bring-Up, and ACPI ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -185,16 +187,19 @@ scheduler, DMA-capable device drivers, and spec-correct ACPI power management †- *Scope*: Implement the INIT-SIPI-SIPI startup sequence to bring additional CPU cores online: a real-mode trampoline, per-core state, and a documented lock-ordering discipline for structures shared across cores. - *Extension*: Use the newly-online cores as the foundation for a genuine multi-core scheduler (see "Kernel Multitasking" above). + - *Size*: Bachelor's thesis. 4. **PIC to I/O APIC Transition**: - *Scope*: Implement an I/O APIC device/driver pair, parse the ACPI MADT's Interrupt Source Override entries to correctly resolve legacy ISA IRQs to Global System Interrupts, and switch interrupt delivery away from the legacy 8259 PICs (via the IMCR, or the ACPI-blessed ``_PIC`` control method). - *Extension*: Mask the legacy PICs once the I/O APIC path is confirmed working, and make the kernel's interrupt-acknowledgment path mode-aware. + - *Size*: Semester thesis, without the extension. 5. **ACPI AML Interpreter**: - *Scope*: Implement a bytecode interpreter for ACPI Machine Language (AML): object namespace construction and control-method invocation (e.g. ``_STA``, ``_PS0``/``_PS3``, ``_PIC``, ``_S5``). TeachOS currently only parses static ACPI tables (the MADT and similar); AML execution is a substantial, largely self-contained undertaking on top of that and a good fit for a Bachelor's thesis on its own. - *Extension*: Use the interpreter to perform a spec-correct interrupt-mode switch and ACPI S5 shutdown, replacing fixed-register/IMCR shortcuts. + - *Size*: For a basic implementation, not processing all AML byte code, a semester thesis. A bachelor's thesis otherwise. Platform Ports (64-bit Architectures) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -205,11 +210,13 @@ To validate the platform-independence of the `kapi/ <kapi>`_ interface, ports to 6. **ARM64 (AArch64) Port**: - *Scope*: Implement the platform-defined KAPI interfaces for a 64-bit ARM target (e.g., QEMU `virt` board or Raspberry Pi 4). This includes writing the boot startup assembly, configuring the translation table (MMU paging), handling the Generic Interrupt Controller (GIC), and implementing timer ticks. + - *Size*: At least one bachelor's thesis. Likely a semester + bachelor's thesis project. 7. **RISC-V 64-bit (RV64G) Port**: - *Scope*: Port TeachOS to the RISC-V 64-bit architecture. This involves implementing boot assembly, configuring page table mappings (Sv39/Sv48), setting up the Core Local Interruptor (CLINT) and Platform-Level Interrupt Controller (PLIC), and managing supervisor/user mode transitions. - + - *Size*: At least one bachelor's thesis. Likely a semester + bachelor's thesis project. + - Memory Management Subsystem Extensions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -219,15 +226,18 @@ There are significant opportunities to implement standard production-grade memor 8. **Buddy Page Allocator**: - *Scope*: Replace the current `bitmap_frame_allocator <kernel/kernel/memory/bitmap_allocator.hpp>`_ with a Buddy Allocator system. This manages memory allocations in power-of-two page sizes, significantly reducing external fragmentation and improving allocation speed. + - *Size*: Semester thesis. 9. **Slab/Slub/Slob Object Allocator**: - *Scope*: Implement a slab allocator on top of the physical page allocator. This caches kernel objects of identical size (such as inodes, file descriptors, and thread control blocks) to avoid constant heap fragmentation and overhead from the general-purpose `block_list_allocator <kernel/kernel/memory/block_list_allocator.hpp>`_. + - *Size*: Semester thesis. 10. **Advanced Virtual Memory (Copy-on-Write, Demand Paging)**: - *Prerequisite*: A basic thread multitasking subsystem. - *Scope*: Implement a page fault handler that dynamically loads executable segments only when touched (demand paging), or implement copy-on-write page table sharing (crucial for implementing Unix-like `fork` semantics). + - *Size*: Bachelor's thesis. Filesystem Support and VFS Extensions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -239,18 +249,22 @@ Project opportunities here include implementing new drivers or core VFS caching - *Scope*: Ext2 write support — inode and block allocation, directory-entry management, and superblock consistency — is already substantially implemented in the `ext2 <kernel/kernel/filesystems/ext2/filesystem.hpp>`_ driver. The concrete remaining gap is ``unlink()``, ``rmdir()``, and ``rename()``, none of which exist yet anywhere in the VFS-facing filesystem interfaces. - *Extension*: ``rename()`` across a mount boundary is a substantially harder problem than the same-filesystem case, and a good extension once the basic operations land. + - *Size*: Part of a FS-centric semester thesis. With the rename extension part of an FS-centric bachelor's thesis. 12. **New Filesystem Drivers (e.g., FAT32, ISO 9660)**: - *Scope*: Implement new filesystem drivers from scratch (such as FAT32 or ISO 9660 for CD-ROMs), allowing TeachOS to interoperate with standard virtual media and flash drives. + - *Size*: Depending on the specific filesystem, a semester or bachelor's thesis. 13. **Unified Page Cache and Directory Entry Cache**: - *Scope*: Develop a page caching subsystem that intercepts read/write VFS calls, caching recently accessed filesystem blocks in physical memory frames, and optimize pathname lookup times using a dynamic directory entry (dentry) cache. TeachOS currently has no page cache at all, which is a correctness concern as much as a performance one: two open file descriptors on the same file can see divergent views of the same underlying data. + - *Size*: Semester thesis. 14. **Virtual Filesystems (e.g., procfs, sysfs)**: - *Scope*: Create virtual filesystems that dynamically generate contents from current kernel data structures, providing userspace with debugging and configuration access interfaces. + - *Size*: Likely not suitable for a standalone thesis at the moment, since no userspace exists. Otherwise a semester thesis. Hardware Buses and Device Drivers .................................. @@ -261,21 +275,26 @@ Real hardware interaction requires expanding driver support: 15. **PCI/PCIe Bus Discovery**: - *Scope*: Develop a PCI/PCIe bus driver that scans configuration spaces, detects connected devices, and registers them to the virtual root bus using the `kapi::devices <kapi/kapi/devices.hpp>`_ interface. + - *Size*: At least one bachelor's thesis. Possibility of running as a semester + bachelor's thesis. 16. **PS/2 Keyboard Controller (Intel 8042)**: - *Scope*: Implement a driver for the legacy 8042 keyboard controller: enumerate its keyboard (and, where present, mouse) channels as separate devices, and implement a minimal scancode translation layer. Does not require PCI discovery, which makes it a good smaller-scale companion or precursor project to USB below. + - *Size*: Semester thesis, likely plus additional work packages. 17. **Storage Controller Drivers (AHCI/SATA, NVMe, or virtio-blk)**: - *Prerequisite*: PCI bus discovery. - *Scope*: Write a driver for SATA controllers (AHCI), modern NVMe drives, or the virtio-blk paravirtualized interface, routing block read/write operations from the VFS to actual (or emulated) physical disks. AHCI is TeachOS's QEMU machine's native, default-attached storage controller and a natural first target; virtio-blk trades realism for a simpler, more forgiving protocol under emulation. + - *Size*: At least one bachelor's thesis, even with reduced scope. 18. **USB Host Controller and Device Support**: - *Prerequisite*: PCI bus discovery (for the xHCI host controller). - *Scope*: Implement an xHCI host controller driver and USB device enumeration (descriptor requests, configuration selection), modeling each USB interface as its own device carrying a class-specific facet (e.g. HID, mass storage). A HID keyboard driver is a natural first target to prove the model end-to-end. A substantial, multi-stage project on its own. + - *Size*: At least one bachelor's thesis, even with reduced scope. 19. **Network Stack and Driver Integration**: - *Scope*: Interface with a network adapter (e.g., Intel e1000 or VirtIO-net), and develop a lightweight network stack (ARP, IPv4, UDP) to allow TeachOS to send and receive raw network frames. + - *Size*: At least one bachelor's thesis, even with reduced scope. |
