Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSC227 — CPU Scheduler Simulation

A small Java simulation of CPU scheduling (SJF, Round Robin, Priority). The program reads jobs from job.txt, loads them into memory, and runs the chosen scheduler while printing statistics.

Build & Run

  1. Compile sources to bin:
javac -d bin src/*.java
  1. Run the program (keep job.txt in the project root):
java -cp bin Main

When running, the program will prompt to choose an algorithm:

  • Enter 1 for SJF
  • Enter 2 for Round Robin
  • Enter 3 for Priority

Input

Place job.txt in the project root. The program's FileReaderTask reads that file to create jobs.

Project files (src)

  • Main.java — program entry, starts FileReader, Loader, and Scheduler.
  • FileReaderTask.java — reads job.txt into the job queue.
  • LoaderTask.java — moves jobs into memory/ready queue.
  • Scheduler.java — scheduling logic (SJF, RR, Priority).
  • MemoryManager.java, PCB.java — memory and process control block utilities.

Notes

  • Memory manager default size = 2048 (set in Main).
  • The program uses simple console prompts; run in a terminal for interactive input.

Short and simple — update as needed.

About

A multithreaded CPU scheduler simulation developed in Java. Implements Shortest Job First (SJF), Round Robin (RR), and Priority Scheduling algorithms with aging. Features dynamic memory management simulation and starvation detection

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages