Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“‹ Smart Task Scheduler

An intelligent task management system powered by CPU scheduling algorithms from Operating Systems

React Node.js MongoDB Tailwind CSS

๐ŸŽฏ Overview

Smart Task Scheduler brings the power of CPU scheduling algorithms to everyday task management. Instead of manually organizing tasks, the system uses proven Operating System algorithms to optimize task execution order based on your priorities, deadlines, and durations.

Key Features

  • โœ… 5 Scheduling Algorithms - FCFS, SJF, Priority, EDF, Round Robin
  • ๐Ÿ“Š Visual Schedule View - See optimized task order with detailed timings
  • ๐Ÿ“ˆ Performance Analytics - Track metrics like waiting time, turnaround time, throughput
  • ๐ŸŽจ Modern UI - Responsive design with Tailwind CSS
  • ๐Ÿ”„ Full CRUD Operations - Complete task management system
  • ๐Ÿ“ฑ Mobile Responsive - Works seamlessly on all devices

๐Ÿš€ Quick Start

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB Atlas account (or local MongoDB)
  • npm or yarn package manager

Installation

  1. Clone the repository
cd d:\OS_Project
  1. Setup Backend
cd smart-task-scheduler-server
npm install

Create a .env file in the server directory:

DB_USER=your_mongodb_username
DB_PASS=your_mongodb_password
PORT=3000
  1. Setup Frontend
cd ../smart-task-scheduler
npm install

Running the Application

  1. Start Backend Server
cd smart-task-scheduler-server
npm start

Server runs on http://localhost:3000

  1. Start Frontend Development Server
cd smart-task-scheduler
npm run dev

Frontend runs on http://localhost:5173

  1. Open in Browser
http://localhost:5173

๐Ÿ“š Project Structure

smart-task-scheduler/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ About/              # About page component
โ”‚   โ”œโ”€โ”€ AlgorithmSelector/  # Algorithm selection interface
โ”‚   โ”œโ”€โ”€ Dashboard/          # Main task dashboard
โ”‚   โ”œโ”€โ”€ HomePage/           # Landing page
โ”‚   โ”œโ”€โ”€ MainLayout/         # Layout wrapper
โ”‚   โ”œโ”€โ”€ Router/             # Route configuration
โ”‚   โ”œโ”€โ”€ ScheduleView/       # Schedule visualization
โ”‚   โ”œโ”€โ”€ StatsView/          # Performance statistics
โ”‚   โ”œโ”€โ”€ TaskForm/           # Add/Edit task form
โ”‚   โ””โ”€โ”€ shared/             # Navbar, Footer components
โ”œโ”€โ”€ public/                 # Static assets
โ””โ”€โ”€ package.json

smart-task-scheduler-server/
โ”œโ”€โ”€ index.js                # Main server file
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ .env                    # Environment variables

๐ŸŽ“ Scheduling Algorithms

1. First Come First Serve (FCFS)

  • Strategy: Execute tasks in arrival order
  • Use Case: Simple queue processing
  • Pros: Fair and simple
  • Cons: Can cause convoy effect

2. Shortest Job First (SJF)

  • Strategy: Execute shortest tasks first
  • Use Case: Minimize average waiting time
  • Pros: Optimal average waiting time
  • Cons: Long tasks may starve

3. Priority Scheduling

  • Strategy: Execute high-priority tasks first (1-5 scale)
  • Use Case: When tasks have different importance
  • Pros: Critical tasks complete quickly
  • Cons: Low-priority tasks may starve

4. Earliest Deadline First (EDF)

  • Strategy: Execute tasks with earliest deadlines
  • Use Case: Time-critical work
  • Pros: Minimizes deadline violations
  • Cons: May ignore task priority

5. Round Robin

  • Strategy: Time-slicing with 15-minute quantum
  • Use Case: Fair time distribution
  • Pros: No starvation, fair
  • Cons: Context switching overhead

๐Ÿ’ก Usage Guide

Adding a Task

  1. Navigate to Dashboard
  2. Click "Add New Task"
  3. Fill in:
    • Title (required)
    • Description
    • Duration in minutes (required)
    • Priority 1-5 (required)
    • Deadline (required)
    • Category
    • Status

Generating a Schedule

  1. Go to "Select Algorithm"
  2. Choose one of 5 algorithms
  3. Click "Generate Schedule"
  4. View optimized task order

Viewing Statistics

  1. After generating schedule
  2. Click "View Stats"
  3. Analyze:
    • Average Waiting Time
    • Average Turnaround Time
    • CPU Utilization
    • Throughput
    • Efficiency Rating

๐Ÿ“Š Performance Metrics

Task-Level Metrics

  • Start Time: When task execution begins
  • End Time: When task completes
  • Waiting Time: Time spent waiting before execution
  • Turnaround Time: Total time from arrival to completion

System-Level Metrics

  • Average Waiting Time: Mean waiting time across all tasks
  • Average Turnaround Time: Mean turnaround time
  • Total Completion Time: Time to finish all tasks
  • Throughput: Tasks completed per hour
  • CPU Utilization: Percentage of CPU busy time

๐Ÿ› ๏ธ Technology Stack

Frontend

  • React 19 - Modern UI library
  • React Router - Client-side routing
  • Tailwind CSS 4 - Utility-first CSS framework
  • Vite - Fast build tool and dev server

Backend

  • Node.js - JavaScript runtime
  • Express - Web application framework
  • MongoDB - NoSQL database
  • Mongoose - MongoDB object modeling

๐Ÿ”Œ API Endpoints

Method Endpoint Description
GET /tasks Get all tasks
GET /tasks/:id Get single task
POST /tasks Create new task
PUT /tasks/:id Update task
DELETE /tasks/:id Delete task
POST /schedule Generate schedule

Example API Request

// Generate schedule with SJF algorithm
const response = await fetch('http://localhost:3000/schedule', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    tasks: tasksArray,
    algorithm: 'SJF'
  })
});

๐ŸŽจ Features in Detail

Dashboard

  • View all tasks in organized table
  • Color-coded categories and priorities
  • Edit and delete tasks
  • Real-time task count
  • Responsive design

Task Form

  • Input validation
  • Date/time picker for deadlines
  • Priority dropdown (1-5)
  • 11 category options
  • Status tracking

Algorithm Selector

  • Visual cards for each algorithm
  • Detailed pros/cons
  • Best use case recommendations
  • Task count display

Schedule View

  • Detailed execution order table
  • Start/end times for each task
  • Waiting and turnaround times
  • Quick stats preview

Stats View

  • KPI dashboard cards
  • Average metrics
  • Min/Max/Avg analysis
  • Algorithm-specific insights
  • Performance ratings

๐Ÿงช Testing

Sample Data

The application comes with 50 pre-populated tasks covering:

  • Multiple categories (study, planning, design, frontend, backend, etc.)
  • Various priorities (1-5)
  • Different durations (30-90 minutes)
  • Realistic deadlines

Testing Different Algorithms

  1. Use the same task set
  2. Try each algorithm
  3. Compare results:
    • SJF typically has lowest avg waiting time
    • Priority favors high-priority tasks
    • EDF focuses on deadlines
    • Round Robin provides fair distribution

๐Ÿ“– Educational Value

This project demonstrates:

  • CPU scheduling algorithms from Operating Systems
  • Full-stack web development
  • RESTful API design
  • React component architecture
  • Database operations with MongoDB
  • Performance metric calculations
  • UI/UX design principles

๐Ÿค Contributing

This is an educational project for Operating Systems course. Feel free to:

  • Report bugs
  • Suggest features
  • Improve documentation
  • Enhance algorithms

๐Ÿ“ License

This project is created for educational purposes as part of an Operating Systems course.

๐Ÿ‘ฅ Target Audience

  • Students - Managing study schedules and assignments
  • Professionals - Organizing projects and deadlines
  • Developers - Learning OS concepts practically
  • Anyone - Seeking optimized task management

๐Ÿ”ฎ Future Enhancements

  • User authentication
  • Multiple workspaces
  • Task dependencies
  • Export to PDF/CSV
  • Email notifications
  • Dark mode
  • Advanced filtering
  • Calendar integration

๐Ÿ“ž Support

For issues or questions:

  1. Check the browser console for errors
  2. Verify both servers are running
  3. Check MongoDB connection
  4. Review .env configuration

๐ŸŽ‰ Acknowledgments

  • Inspired by CPU scheduling algorithms from Operating Systems
  • Built with modern web technologies
  • Designed for both learning and practical use

Made with โค๏ธ for Operating Systems Project 2025

Ready to optimize your schedule? Start by running the application and exploring different algorithms! ๐Ÿš€

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages