Draft:Operating system/Operating Systems/Scheduling

Every process that needs to be be executed, must reside in RAM and process that need to be executed must have CPU access. In single processor systems, the CPU can handle only one task at a time, so what if there are too many processes that are ready to be executed? The answer is that the operating system then schedules the process accordingly, so that the processor will be able to execute all the process. "Scheduling is an activity that will be done by the operating system component called the Scheduler. The purpose of the scheduler, is to choose processes from the list of ready processes". Dispatcher id: the component of the Operating System that dispatches the ready process to the processor, so that it can be executed. Scheduling algorithms are listed below: a)First Come First Serve.

b) Shortest Job First.

c) Priority Based Scheduling.

d) Round Robin.

Lets see, one by one, what we mean by these algorithms.

a) First Come First Serve : As meaning suggests, the process that will come first will be served first by the processor.  This algorithm is simple and can be easily implemented.  To implement this FIFO is maintained. FIFO(First in; First Out).  The process site in front of ready queue(The queue contains processes that can be executed by CPU) will be executed first. But the disadvantage of this algorithm is that average waiting time for any process is longer.

b) Shortest Job First: As the name suggests the processor executes the job which requires the shortest execution time. Even when there are 24 or more processes in the ready queue the processor would pick the 24th process if it was the one that needed less time.

c) Priority based scheduling:

d) Round robin: