Skip to content

feat: add multilevel feedback queue scheduling - #3249

Open
akshitam18 wants to merge 1 commit into
TheAlgorithms:masterfrom
akshitam18:feat/mlfq-scheduling
Open

akshitam18 wants to merge 1 commit into
TheAlgorithms:masterfrom
akshitam18:feat/mlfq-scheduling

Conversation

@akshitam18

Copy link
Copy Markdown

Description of Change

Implemented Multilevel Feedback Queue (MLFQ) CPU scheduling in cpu_scheduling_algorithms/mlfq_scheduling.cpp.

  • Added three scheduling queues: Q0 and Q1 use Round Robin with time quanta of 4 and 8, respectively, while Q2 uses FCFS.
  • Processes are demoted when they exhaust their time quantum.
  • Higher-priority arrivals can preempt lower-priority processes, and interrupted processes retain their unused quantum.
  • Added seven test cases covering simultaneous arrivals, preemption, empty input, CPU idle time, quantum boundaries, and preservation of input order.

Checklist

Notes: Added an MLFQ CPU scheduling implementation with three priority levels and test cases for important scheduling scenarios.

This branch has not been deployed

No deployments
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