Implement Priority Round Robin Scheduling Algorithm with Tests
- Added `priority_rr` algorithm to handle scheduling based on priority and round-robin principles. - Created unit tests for `select()`, `shouldPreempt()`, and `isQuantumExpired()` functions to ensure correct behavior. - Developed integration tests to validate the scheduling logic under various scenarios, including preemption and round-robin execution. - Introduced `useExport` hook for exporting process metrics to CSV format. - Added `useGanttScroll` hook to manage smooth scrolling of the Gantt chart during simulation.
This commit is contained in:
1 parent
083fc0027e
commit
51a8a6fa40
38 files changed
+2530
-45
No files matched your search
@@ -3,6 +3,7 @@ import { fcfs } from "./fcfs";
|
||||
import { sjfNp, srtf } from "./sjf";
|
||||
import { rr } from "./rr";
|
||||
import { priorityNp, priorityP } from "./priority";
|
||||
import { priorityRr } from "./priority_rr";
|
||||
import { hrrn } from "./hrrn";
|
||||
import { multilevel } from "./multilevel";
|
||||
|
||||
@@ -54,6 +55,7 @@ export const algorithms: Record<SchedulingAlgorithm, SchedulerAlgorithm> = {
|
||||
RR: rr,
|
||||
PRIORITY_NP: priorityNp,
|
||||
PRIORITY_P: priorityP,
|
||||
PRIORITY_RR: priorityRr,
|
||||
HRRN: hrrn,
|
||||
MULTILEVEL: multilevel,
|
||||
};
|
||||
Reference in new issue
Block a user