Scheduling Algorithms: Balancing Overhead and Prioritization in CPU Resource Allocation


CPU Scheduler Overview 

Because processes must share CPU resources, two CPU scheduling processes determine which processes in the queue will receive CPU resources next and if processes will swap CPU before completing as they wait for other necessary components before they can complete. In Preemptive Scheduling, the CPU scheduler runs in the background and identifies the process that will next receive CPU resources. Similar to a load balancer, as processes run and complete, the dispatcher receives instructions from the CPU scheduler and allocates the CPU to the selected process. Because processes must share CPU resources, the dispatcher constantly allocates, deallocates, and reallocates the CPU between prioritized active and idle processes based on the instructions from the CPU scheduler.


Background Information

In Non-pre-emptive Scheduling, the operating system allocates resources based on instructions it receives from the active processes.  


Preemptive Scheduling. While Preemptive Scheduling places more control over prioritizing tasks to the operating system, the frequent allocation and deallocation of CPU resources to the processor produces an overhead that costs CPU resources to run the scheduler and dispatcher. The CPU scheduler uses additional resources for switching; however, Preemptive Scheduling decreases process wait time by making prioritized decisions. In this flexible environment, the CPU is loaned to processes, and processes can be interrupted to reallocate resources if a higher-priority process requires it. Round-robin scheduling follows a preemptive scheduling model for evenly allocating resources among processes.  


Non-preemptive Scheduling. The inverse is true when operating in a non-preemptive environment. The environment is not as flexible to the operating system, and processes run and complete before CPU resources are allocated and deallocated. While there is less CPU overhead, the response is much faster, and wait times prove longer as CPU resources will be assigned for the entire time a process runs. First Come, First Serve Scheduling follows a non-preemptive scheduling model as the operating system assigns CPU on a first-come, first-serve basis.

Comments

Popular posts from this blog

SalonAboutBeauty: Less Integration for Consistent Styling Across Components

Why “Human Error” Is Usually a System Design Problem

Challenges in Prosecuting Deep Web and Darknet Crimes: The Case of Ross Ulbricht and the Silk Road