Project Documentation

Technical Breakdown, User Guide & Testing Instructions

Back to Dashboard

How to Run the Simulator

OPTION 1: Demo Mode

Loads a pre-set "Starvation Scenario" (1 Long Job vs. 5 Short Jobs). Use this to instantly visualize how WDS prevents the long job from being blocked forever.

OPTION 2: Custom Input

Enter your own Arrival Times, Burst Times, and Priorities. Use this mode to test specific homework problems or stress-test the algorithm.

Project Purpose

Why was this built? Standard operating system schedulers like FCFS and SJF are rigid. They optimize for either speed or fairness, but never both.

The goal of this project is to demonstrate a Hybrid Heuristic Algorithm (WDS) that uses a weighted formula to dynamically adapt its behavior. It proves that we can achieve high throughput (Speed) without sacrificing user experience (Fairness) in Cloud and 5G environments.

The WDS Formula

Instead of a rigid rule, WDS calculates a real-time score for every waiting process. The highest score wins.

Score = (W_wait × WaitTime) + (W_burst × 30/BurstTime) + (W_prio × Priority)
Component Why we need it? (The Logic)
W_wait (Aging) Ensures that if a task waits for a long time, its score grows massive, forcing the CPU to pick it. (Solves Starvation).
W_burst (Efficiency) Gives a bonus to short jobs. This clears the queue quickly and lowers average system latency.
W_prio (Urgency) Allows critical tasks (e.g., "System Crash Alert") to override the math and run immediately.

For Developers: What to Test?

If you are looking to find flaws or verify stability, try these specific edge cases in Custom Mode:

  • TEST 1 The Starvation Trap
    Add one massive job (Burst=100) followed by many tiny jobs (Burst=1).
    Expected Result: The massive job should eventually run due to the "Aging Factor".
  • TEST 2 The Priority Override
    Add a long job, then add a short job with Priority=10.
    Expected Result: The Priority=10 job should cut the line immediately.
  • TEST 3 The Zero Burst Crash
    Try entering a Burst Time of 0.
    Expected Result: The system should handle it gracefully (internally converts to minimal burst) without crashing.

The Problem

FCFS: Causes "Convoy Effect" (UI freezes behind background tasks).

SJF: Causes "Starvation" (Long videos never process if short texts keep coming).

The WDS Solution

Hybrid Approach: Acts like SJF when the system is busy to clear traffic, but switches to Fairness mode for old tasks.

Cooperative: Uses "Yield Points" to allow high-priority interruptions.

Tech Stack

  • Backend Logic: Python (Flask)
  • Algorithm: Custom Heuristic (O(N) Complexity)
  • Frontend: HTML5, Bootstrap 5, Jinja2
  • Deployment: Vercel (Serverless)