Skip to content

feat: Add Round Robin CPU scheduling algorithm#3194

Open
harshitrajput2802 wants to merge 3 commits into
TheAlgorithms:masterfrom
harshitrajput2802:add-round-robin-scheduling
Open

feat: Add Round Robin CPU scheduling algorithm#3194
harshitrajput2802 wants to merge 3 commits into
TheAlgorithms:masterfrom
harshitrajput2802:add-round-robin-scheduling

Conversation

@harshitrajput2802

Copy link
Copy Markdown

Description of Change

Added an implementation of the Round Robin (RR) CPU scheduling algorithm, a preemptive scheduling technique that allocates CPU time to processes using a fixed time quantum.

This implementation:

  • Schedules processes in a FIFO ready queue while respecting process arrival times.
  • Ensures that newly arrived processes are admitted to the ready queue before a preempted process is re-queued, matching the standard Round Robin scheduling behavior.
  • Supports configurable time quantum values with input validation.
  • Includes an independent unit-tick reference implementation for correctness verification.
  • Adds regression tests and randomized self-tests to validate the scheduler against the reference implementation.
  • Provides comprehensive Doxygen documentation and follows the project's coding conventions, including namespace organization and self-contained examples.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Implemented the Round Robin CPU scheduling algorithm with an independent reference implementation, regression tests, randomized validation, and comprehensive Doxygen documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant