Skip to content

Repository files navigation

AI-Driven Process Recommendation System 🚀

An advanced, hybrid process monitoring and recommendation system that combines deterministic Rule-Based logic with Machine Learning (Random Forest) to optimize system performance and user workflow.


🌟 Overview

This project serves as an intelligent process manager for modern operating systems. It doesn't just list processes; it analyzes them. By monitoring CPU, memory, and thread usage in real-time, the system provides actionable recommendations (Prioritize, Monitor, Pause, Terminate) to keep your workspace smooth and efficient.

The Hybrid Advantage

  • v1.0 (Rule Engine): Reliable, transparent logic based on resource thresholds and process categories (System, Browser, Dev Tools, etc.).
  • v2.0 (ML Model): A Random Forest Classifier that learns from your behavior. As you label processes as "Critical" or "Expendable", the AI adapts its recommendations to match your specific needs.

🛠️ Tech Stack

  • Backend: Python, Flask, psutil (System Monitoring), scikit-learn (Machine Learning).
  • Frontend: React (JSX), Vanilla CSS (Modern Glassmorphism UI).
  • Data Storage: JSON for metadata, Pickle for model serialization.
  • Algorithms: Random Forest Classifier, Rule-Based Heuristics.

🚀 Key Features

1. Intelligent Monitoring

  • Real-time Stats: CPU Usage (per core), RAM consumption, Swap memory, and CPU Temperature.
  • Process Categorization: Automatically detects if a process is a System tool, Browser, Media app, or Developer tool.
  • Resource Composite Score: Sorts processes by a weighted balance of CPU (60%) and Memory (40%) to highlight the most impactful tasks.

2. User-Driven AI Training

  • Manual Labeling: Users can explicitly label processes.
  • Auto-Training: The system automatically re-trains the ML model as you provide feedback, improving its accuracy over time.
  • Model Insights: View feature importance (e.g., how much "Memory %" influences the AI's decision).

3. Dynamic Process Control

  • Tree-Aware Actions: Killing or pausing a process automatically handles all its child processes recursively.
  • Priority Boosting: Use the "Prioritize" action to give critical tools more CPU cycles.

📂 Project Structure

  • process_backend.py: The unified API server and core logic engine.
  • process_dashboard.jsx: The premium React frontend (served directly by the backend).
  • model_metadata.json: Real-time training metrics and feature importances.
  • process_model.pkl: The saved state of your personalized AI model.

⚙️ Installation & Setup

1. Prerequisites

Ensure you have Python 3.8+ installed.

2. Install Dependencies

pip install flask flask-cors psutil scikit-learn numpy

3. Run the Application

python process_backend.py

After running, open your browser to: http://localhost:5000


📖 How to Use

  1. Monitor: Use the dashboard to see which processes are consuming the most resources.
  2. Label: Help the AI learn! Label your favorite tools as Critical and background junk as Expendable.
  3. Train: Click the "Train" button (if triggered or after enough labels) to switch the engine from Rule-Based to ML-Driven.
  4. Action: Use the action buttons (Kill, Pause, Resume, Boost) to manage your system directly from the web interface.

🛡️ Safety Note

The system includes a System Process Protection layer. Processes categorized as "System" (like kernel, lsass, or svchost) are automatically prioritized and protected from accidental termination by the rule engine.


Created as part of the Process-Scheduler-OS project.

About

Ai-powered process scheduler for the OS project problem statement

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages