Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

CPU Scheduler Simulation Project

This project was developed as part of a data structures coursework. It focuses on comparing the performance of different CPU scheduling simulations using fundamental data structures such as Queue, Stack, Linked List, and Priority Queue. The goal is to understand how each scheduler performs under simultaneous task execution scenarios.


Project Objective

To simulate and analyze the performance of different scheduling strategies based on:

  • Response Time
  • Turnaround Time
  • Execution Time

We implemented the following schedulers:

  • Scheduler A: Queue (FIFO)
  • Scheduler B: Linked List
  • Scheduler C: Stack (LIFO)
  • Scheduler D: Priority Queue (Shortest Job First)

Technologies Used

  • Language: Java
  • Time Measurement: System.nanoTime() for high-precision execution timing
  • Data Structures: Stack, Queue, LinkedList, PriorityQueue

Methodology

  1. Tasks were simulated to arrive simultaneously at the CPU.
  2. Each task was scheduled using different data structure implementations.
  3. Execution time and system metrics were recorded and compared.
  4. Scheduler performance was evaluated based on:
    • Time efficiency
    • Job ordering logic
    • Adaptability to CPU workload

Key Findings

  • Queue (FIFO): Simple and predictable but may be inefficient with longer tasks arriving early.
  • Linked List: Allows flexible insertion/removal but requires careful management of node pointers.
  • Stack (LIFO): Prioritizes newer tasks but can delay long-standing tasks.
  • Priority Queue: Implemented SJF; showed the best efficiency in minimizing turnaround time.

About

Data Structure Project Pt 2

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages