Skip to content

devlup-labs/CogniOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CogniOS

Intelligent OS Observability & Adaptive Workload Optimization Platform

CogniOS is an AI-assisted Linux system observability and workload optimization platform that combines operating systems, machine learning, and systems engineering to provide intelligent performance monitoring, anomaly detection, workload-aware optimization, crash analysis, and scheduling researchβ€”all without modifying the Linux kernel.


Overview

Modern operating systems expose a large amount of telemetry, but existing monitoring tools often present only raw statistics, leaving users to determine the root cause of performance issues themselves.

CogniOS bridges this gap by collecting real-time system telemetry, analyzing workload behavior, detecting anomalies, recommending optimizations, and enabling post-crash analysis through an integrated and modular architecture.

The project is designed as both:

  • A practical system observability platform for Linux
  • A research framework for experimenting with AI-assisted operating system scheduling

Key Features

  • πŸ“Š Real-time Linux system telemetry collection
  • 🩺 Intelligent anomaly detection for performance degradation
  • 🎯 AI-based workload classification and optimization
  • πŸ“¦ Rolling telemetry recording for crash replay
  • πŸ”¬ Scheduling algorithm benchmarking and research
  • πŸ“ˆ Interactive Streamlit dashboard
  • πŸ—„οΈ Centralized SQLite telemetry database
  • 🧩 Modular architecture for independent development and testing

Architecture

                Linux System
                     β”‚
                     β–Ό
          Telemetry Collectors
       (/proc, psutil, process APIs)
                     β”‚
                     β–Ό
             SQLite Database
                     β”‚
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β”‚               β”‚                β”‚
     β–Ό               β–Ό                β–Ό
 OS Doctor       FocusOS         BlackBox
     β”‚               β”‚                β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β–Ό
             Research Engine
                     β”‚
                     β–Ό
          Streamlit Dashboard

Core Modules

🩺 OS Doctor

OS Doctor continuously monitors the system for abnormal behavior using machine learning–based anomaly detection techniques.

Objective

  • Detect abnormal CPU, memory and I/O behavior
  • Explain possible reasons for system slowdowns
  • Identify unusual workload patterns
  • Provide interpretable diagnostics from live telemetry

🎯 FocusOS

FocusOS is responsible for intelligent workload classification and adaptive system optimization.

Objective

  • Classify the current workload using machine learning
  • Optimize process priorities
  • Modify Linux scheduling parameters
  • Improve overall system responsiveness

Future versions may also support dynamic CPU affinity optimization and workload-aware scheduling.


πŸ“¦ BlackBox

BlackBox acts as the system's flight recorder.

It continuously stores recent telemetry in a rolling buffer, allowing developers to replay system activity after crashes or freezes.

Objective

  • Record recent system telemetry
  • Preserve crash history
  • Replay workload traces
  • Assist in post-mortem debugging

πŸ”¬ Research Engine

The Research Engine provides an experimentation platform for scheduling algorithms.

Objective

  • Compare classical scheduling algorithms
  • Evaluate AI-based schedulers
  • Replay collected workloads
  • Benchmark scheduling performance
  • Support reinforcement learning experiments

Supported scheduling algorithms include:

  • FCFS
  • Shortest Job First
  • Round Robin
  • Priority Scheduling

Future versions may include reinforcement learning schedulers.


πŸ“Š Dashboard

The Streamlit dashboard serves as the unified visualization layer of CogniOS.

Objective

  • Visualize system telemetry
  • Display anomaly alerts
  • Monitor workload classifications
  • Compare scheduling results
  • Provide a centralized monitoring interface

πŸ“‘ Collectors

Collectors gather telemetry directly from Linux using lightweight system interfaces.

Objective

  • CPU monitoring
  • Memory monitoring
  • Disk monitoring
  • Process monitoring
  • Network statistics
  • I/O statistics

These collectors act as the data source for every other module.


πŸ—„οΈ Data Layer

The data layer stores all telemetry generated by the collectors.

Responsibilities

  • Store real-time telemetry
  • Maintain workload traces
  • Persist crash recordings
  • Provide data for ML training
  • Support benchmarking experiments

SQLite is used as the centralized storage backend.


Repository Structure

CogniOS/
β”‚
β”œβ”€β”€ blackbox/               # Rolling telemetry recorder and crash replay engine
β”œβ”€β”€ collectors/             # System telemetry collectors using /proc and psutil
β”œβ”€β”€ dashboard/              # Streamlit-based monitoring dashboard
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ datasets/           # Labeled workload datasets for ML training
β”‚   β”œβ”€β”€ telemetry/          # Raw telemetry snapshots
β”‚   └── sqlite/             # SQLite database files
β”œβ”€β”€ focusos/                # AI workload classifier and adaptive optimization engine
β”œβ”€β”€ os_doctor/              # Real-time anomaly detection module
β”œβ”€β”€ research_engine/        # Scheduling simulator and benchmarking framework
β”œβ”€β”€ utils/                  # Shared helper utilities used across modules
β”‚
β”œβ”€β”€ cognios_as_daemon.py    # Runs CogniOS as a background monitoring daemon
β”œβ”€β”€ config.py               # Global project configuration
β”œβ”€β”€ db.py                   # SQLite database interface and helper functions
β”œβ”€β”€ main.py                 # Main application entry point
β”œβ”€β”€ overhead.py             # Measures runtime overhead introduced by monitoring
β”œβ”€β”€ requirements.txt        # Python dependencies
└── README.md

Technology Stack

Category Technology
Language Python
System Monitoring psutil, Linux /proc
Database SQLite
Machine Learning PyTorch
Data Processing NumPy, Pandas
Anomaly Detection Isolation Forest (scikit-learn)
Reinforcement Learning Stable-Baselines3
Dashboard Streamlit

Getting Started

Clone the Repository

git clone https://github.com/<your-org>/CogniOS.git
cd CogniOS

Install Dependencies

pip install -r requirements.txt

Launch CogniOS

python main.py

To run CogniOS as a background service:

python cognios_as_daemon.py

Development Philosophy

Each major subsystem is designed as an independent module with its own documentation, enabling contributors to work on individual components without affecting the rest of the project.

Every module contains its own dedicated README.md describing:

  • Module architecture
  • Directory structure
  • Components
  • APIs
  • Data flow
  • Usage
  • Future work

Roadmap

  • Real-time Linux telemetry collection
  • Intelligent anomaly detection
  • AI-assisted workload optimization
  • Crash replay and forensic analysis
  • Scheduling benchmark suite
  • Reinforcement learning scheduler
  • GPU telemetry support
  • Windows and macOS support

Contributing

We welcome contributions from developers interested in:

  • Operating Systems
  • Machine Learning
  • Systems Programming
  • Linux Internals
  • Performance Engineering
  • Data Engineering

Before contributing, please read the documentation for the module you wish to work on.


License

This project is released under the MIT License.


Acknowledgements

CogniOS is developed as an educational and research-focused project exploring the intersection of Operating Systems, Artificial Intelligence, and Systems Engineering.

The project aims to provide a modular platform for learning, experimentation, and innovation in intelligent system observability and workload optimization.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages