Skip to content

ctheface/CPU-TASK-SCHEDULER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU Task Scheduler

A learning project implementing different CPU scheduling algorithms to understand core Computer Science concepts and real-world applications of data structures.

Overview

This project implements three fundamental CPU scheduling algorithms:

  • First-Come, First-Serve (FCFS)
  • Round Robin (RR)
  • Priority Scheduling (Non-Preemptive)

Learning Outcomes

Through this project, I gained hands-on experience with:

  • Queue data structure (used in Round Robin scheduling)
  • Vector manipulation (task management)
  • Sorting algorithms (Priority scheduling)
  • Object-Oriented Programming concepts
  • CPU scheduling algorithms and their trade-offs

Features

  • Interactive command-line interface
  • Support for multiple tasks with customizable parameters
  • Real-time calculation of start and finish times
  • Flexible time quantum setting for Round Robin scheduling

Implementation Details

Data Structures Used

  • vector: To store and manage tasks
  • queue: For implementing Round Robin scheduling
  • Custom Task class: To encapsulate task properties

Algorithms

  1. FCFS: Simple implementation using task order
  2. Round Robin: Uses queue for cyclic execution
  3. Priority Scheduling: Implements sorting based on priority

How to Run

# Compile the code
g++ all_in_one.cpp -o main

# Run the executable
./main.exe

Usage

  1. Enter the number of tasks
  2. For each task, provide:
    • Task name
    • Burst time
    • Priority
  3. Choose scheduling algorithm from menu
  4. View execution results

Future Improvements

  • Add more scheduling algorithms
  • Implement visualization of task execution
  • Add performance metrics comparison

About

Learning side quest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages