Back to problems

Implement a Round-Robin Task Scheduler

Object-Oriented Programming · Citadel · Medium

Requirements Build a round-robin scheduler with the following behavior: Provide an operation for inserting new tasks, such as add(task) or enqueue(task). Visit tasks in their arrival or queue order, allowing each runnable task to use one fixed time slice before selecting the next task. Remove a task as soon as it reports completion, while keeping the correct rotation among all tasks that remain. The precise expectations for slice duration, preemption, and blocked tasks are…

Checking your access…