Skip to main content

What is RR scheduling algorithm? A interpretation based on common situations in life

Where ever you go, you can find people in queue to get something processed, either it is airports for getting documents verified or even at hospitals to see a eminent doctor.

People feels boring not only because of processor does not completes execution of their processor but also because of if processor does not even look into their processing need over a constant interval to satisfy their thirst of getting a touch by processor over intervals [ known as starvation ].

Round robin schedules every running processes on main memory for execution for a specific quantum of time and preempts the execution process to give chance for the next, hence gives a lesser starvation.

By adjusting lesser time time quantum the efficiency of execution also get increased.


Popular posts from this blog

Operating Systems | Scheduling Algorithms : Round Robin

Round Robin Features : Most popular algorithm of all Practically implementable Implementable with basic data structures like queue Extremely lesser starvation Optimum efficiency can be set by controlling time quantum The round robin algorithm will continuously switch between processes if a process in CPU (under execution) exceeds a time limit set by OS called time quantum . Flow Chart : Scheduler allocated process to for execution. CPU starts monitoring the execution time right after from allocation. If the process completes its execution before exceeding time quantum, OS forwards the process to termination state. else, the processes gets preempted once the time quantum limit exceeded and if the process finished at this moment, OS moves the process to termination state, else it moves to ready queue and iterates over the whole process listed above. Example : Consider the following table of processes and calculate completion time, turn around time and waiting tim

Operating Systems | Concept of shared memory and critical section

While printing your document opened in Adobe Acrobat Reader, if you gave a same command for document opened in Microsoft Word! How will it be? These are the real time situations where two processes competing together for same resources due to improper process synchronization. An unstructured access approval to these resources may lead to a abnormal output or a breach in information security or even it may cause for data loss. In the above case which might be a bunch of over-written papers coming out of the printer connected to that system. Shared Memory and Critical Section Resources or memory spaces where different processes have access to read, write or update at same time are known as shared memory . And the piece of program which tries to access the shared memory is known as Critical Section . There are situations where an operating system need to handle multiple request from critical sections of various processes in a machine , in order to maintain da

Operating Systems | Lock Variable Synchronization Mechanism

To learn lock variable synchronization mechanism, you have to understand different modes of execution of instructions in an operating system. Basically there are two modes of execution in a system, User Mode and Kernel Mode. The unrestricted access to any resources in the system, for executing instructions in Kernel Mode makes resources available only for most trusted basic level functions of operating system . Direct access of hardware or memory references are not allowed in User Mode , due security concerns over higher level applications. System APIs provide a path way to reference these resources. Features of Lock Variable A software logic implemented in User Mode. A Busy waiting method of synchronization. Multiple processes can be handled by single mechanism. There are two basic section for every synchronization method, which decides the nature of that algorithm, Entry and Exit sections. Arranged as shown. Here in lo