Explain Round Robin algorithm with suitable example.

1 Answer

Answer :

It is preemptive scheduling algorithm. A small unit of time known as a time quantum or time slice is used for pre-emption of a currently running process. Ready queue is implemented as a circular queue. CPU is assigned to the entire processes one by one, on first come first serve basis, for a specific time period. Every process executes for specified time period and CPU is given to the next process when time quantum expires. A new process is added at the tail of the ready queue when it enters the system. CPU scheduler selects first process from head of the ready queue and executes it for a specified time quantum. Once the time quantum expires, dispatcher is invoked to pre-empt current running process and CPU is given to the next process placed at the head of the ready queue. The running process may have a CPU burst time less or greater than time quantum. If burst time of running process is less than the time quantum then, the process itself releases the CPU. The scheduler then selects next process from ready queue and executes it. If burst time of running process is longer than time quantum then, context switch occurs and the process is place at the tail of ready queue for remaining burst time execution.

image

CPU is allocated to process P1 for 4 ms. Since it requires another 20 milliseconds, it is preempted after the first time quantum and the CPU is given to the next process in the queue, process P2. Process P2 does not need 4 milliseconds, so it quits before its time quantum expires. The CPU is then given to the next process, process P3. Once each process has received 1 time quantum, the CPU returns to process P1 for an additional time quantum. 

Related questions

Description : Explain LRU page replacement algorithm for following reference string. 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 Calculate the page fault.

Last Answer : LRU: The Least Recently Used (LRU) page replacement policy replaces the page that has not been used for the longest period of time. LRU replacement associates with each page the time of that page's last use. ... in question so assume frame size as 3 or 4) LRU: Assume frame size=3

Description : Enlist different file allocation methods? Explain contiguous allocation method in detail.

Last Answer : From the user's point of view, a file is an abstract data type. It can be created, opened, written, read, closed and deleted without any real concern for its implementation. The implementation of a ... a times is difficult to estimate. 4. Compaction may be required and it can be very expensive.

Description : Explain multithreading model in detail.

Last Answer : Many systems provide support for both user and kernel threads, resulting in different multithreading models. Following are three multithreading model: Many-to-One Model The many-to- ... True concurrency cannot be achieved. Multiple threads of kernel is an overhead for operating system

Description : Enlist the operating system tools. Explain any two in detail.

Last Answer : Following are the operating tools: User Management Security policy Device Management Performance Monitor Task Scheduler A) User management: User management includes everything ... routing tables, interface statistics, masquerade connections, and multicast memberships. # netstat -tulpn

Description : Explain PCB with diagram.

Last Answer : Each process is represented as a process control block (PCB) in the operating system. It contains information associated with specific process. Process State: It indicates current state of a process. ... . Each PCB gives information about a particular process for which it is designed.

Description : Explain partitioning and its types.

Last Answer : An important operation of memory management is to bring programs into main memory for execution by the processor. Partitioning is a technique that divides a memory into multiple partitions. These partitions ... in memory. For example: Consider following table with process and memory space.

Description : Explain deadlock? What are necessary conditions for deadlock?

Last Answer : In multiprogramming environment, several processes may compete for a finite number of resources. A process requests resources and if the resources are not available then the process enters into the ... Each process is waiting for the resources held by other waiting processes in circular form.

Description : With neat diagram explain inter process communication model.

Last Answer : Inter-process communication: Cooperating processes require an Interprocess communication (IPC) mechanism that will allow them to exchange data and information. There are two models of IPC 1. ... a communication link between them. Between each pair of processes exactly one communication link.

Description : List components of OS. Explain process management in detail.

Last Answer : List of System Components: 1. Process management 2. Main memory management 3. File management 4. I/O system management 5. Secondary storage management Process Management: The operating ... synchronization. 4. A mechanism for process communication. 5. A mechanism for deadlock handling.

Description : Enlist types of operating system. Explain multiprogramming OS in detail.

Last Answer : Types of operating system 1.Batch Systems 2.Multiprogramming 3.Multitasking 4.Time-Sharing Systems 5.Desktop Systems 6.Distributed system 7.Clustered system 8.Real Time system: Multiprogramming ... multiprogramming: user can open word, excel, access and other applications in a system.

Description : Explain any four scheduling criteria.

Last Answer : 1. CPU utilization: In multiprogramming the main objective is to keep CPU as busy as possible. CPU utilization can range from 0 to 100 percent. 2.Throughput: It is the number of processes ... fairly early and can continue computing new results while previous results are being output to the user.

Description : Explain any 4 services provided by OS.

Last Answer : 1.User Interface: All operating systems have a user interface that allows users to communicate with the system. Three types of user interfaces are available: a. Command line interface ( ... to system resources. Security is provided by user authentication such as password for accessing information.

Description : List any four features of open source operating system.

Last Answer : 1. Open Source: open source OS code is freely available and it is community based development project. Multiple team's works in collaboration to enhance the capability of operating system and it is ... issuing a command in Linux Terminal or Shell. Linux can also run Windows applications if needed.

Description : List free space management techniques? Describe any one in detail.

Last Answer : A file system is responsible to allocate the free blocks to the file therefore it has to keep track of all the free blocks present in the disk. There are mainly four approaches by using which, the free ... block. This block contains a pointer to the next free disk block, and so on.

Description : State and describe types of scheduler.

Last Answer : There are three types of scheduler: Long term scheduler Short term scheduler Medium term scheduler 1. Long term scheduler: It selects programs from job pool and loads them into the ... scheduler works in close communication with long term scheduler for loading process into the main memory. 

Description : What is purpose of system call? State two system calls with their functions.

Last Answer : System call provides an interface between a running program and operating system. It allows user to access services provided by operating system. This system calls are procedures written using C, ... send, receive messages transfer status information attach or detach remote devices. 

Description : Write Unix command for following: i)create a folder OSY ii) create a file FIRST in OSY folder iii) List/display all files and directories. iv) Write command to clear the screen

Last Answer : i) create a folder OSY: $mkdir OSY ii)create a file FIRST in OSY folder: $cd OSY $cat>FIRST or $ touch FIRST iii) List/display all files and directories: $ls iv) to clear screen: $clear

Description : Describe sequential and direct access method.

Last Answer : Sequential access: Information from the file is processed in order i.e. one record after another. It is commonly used access mode. For example, editors and compilers access files in sequence. A read ... prevent the user from accessing portions of the file system that may not be part of his file.

Description : Describe I/O Burst and CPU Burst cycle with neat diagram.

Last Answer : CPU burst cycle: It is a time period when process is busy with CPU.  I/O burst cycle: It is a time period when process is busy in working with I/O resources. A process execution consists ... cycle and so on. The final CPU burst cycle ends with a system request to terminate execution.

Description : Describe any four file attributes

Last Answer : File attributes: Name: The symbolic file name is the only information kept in human readable form. Identifier: File system gives a unique tag or number that identifies file within file ... Last modification and last use. These data can be useful for protection, security and usage monitoring.

Description : Write syntax for following commands: i)Sleep ii)Kill

Last Answer : i)sleep Syntax: sleep NUMBER[SUFFIX]… sleep OPTION ii) kill Syntax: kill pid

Description : Define virtual memory

Last Answer : Virtual memory is a memory management capability of an operating system (OS) that uses hardware and software to allow a computer to compensate for physical memory shortages by temporarily transferring data ... can be placed in overlays, but can concentrate instead on the problem to be programmed. 

Description : Draw process state diagram.

Last Answer : process state diagram

Description : Define real time operating system. List its any four applications of it.

Last Answer : Real time Operating System: A real time system has well defined fixed time constraints. Processing should be done within the defined constraints -Hard and Soft real time system. OR The ... Applications: 1. Flight Control System 2. Simulations 3. Industrial control 4. Military applications

Description : A scheduling Algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (lowest priority). The scheduler re-evaluates the process priority for every 'T' time ... (A) Priority scheduling (B) Round Robin Scheduling (C) Shortest Job First (D) FCFS

Last Answer : (B) Round Robin Scheduling

Description : The Simplest CPU – scheduling algorithm is ______. (1) SJF scheduling algorithm (2) Round robin scheduling algorith (3) Multilevel scheduling algorithm (4) FCFS scheduling algorithm

Last Answer : FCFS scheduling algorithm

Description : Who wants to do a round robin story?

Last Answer : It was extremly crowded in there. Everyone was Christmas shopping. Nooks and books were all being rung up. Then, I looked across the crowded, chaotic space and saw….

Description : Why did Charlotte Doyle tell jaggery about the round robin?

Last Answer : What is the answer ?

Description : What is used to see if a client is still connected to a NetWare server? A. Spoofing TCP/SAP B. Watchdog packet C. GNS Round Robin D. DNS Round Robin

Last Answer : Watchdog packet

Description : The modes of a MAC to share a transmission medium are ___. A. Round Robin B. Reservation C. Contention D. All the above

Last Answer : A. Round Robin

Description : The Token Ring implementation works on the __ mode. A. Contention B. Reservation C. Round Robin D. None

Last Answer : C. Round Robin

Description : Which of the following scheduling algorithms may cause starvation? a. First-come-first-served b. Round Robin c. Priority d. Shortest process next e. Shortest remaining time first (1) a, c and e (2) c, d and e (3) b, d and e (4) b, c and d

Last Answer : Answer: 2

Description : In operationg system, Round Robin Scheduling means : (1) A kind of scheduling (2) Repetition policy (3) A memory allocation policy (4) A process allocation policy

Last Answer : A kind of scheduling

Description : If you were Robin Hood, who would you steal from and who would you give to?

Last Answer : I’d steal Triar Fuck’s virginity, giving it to Kevin Costner.

Description : Does anyone have a video or interesting story about Robin Williams?

Last Answer : Your link doesn’t work in your details , maybe you would like to give it another try?

Description : Do you think Robin Williams wouldn't have committed suicide if he wasn't a celebrity?

Last Answer : Depression is an equal-opportunity destroyer. I think it’s good that he found success in film—it was a good outlet for that extraordinary energy and talent. I am deeply saddened by his suicide.

Description : Is it true that Robin Williams commited suicide?

Last Answer : Yes, just saw it. Sad, I loved many of his characters. Report said he had severe depression.

Description : Question about the legality of Robin Hood.

Last Answer : It’s a popularity ponsi scheme

Description : What to do about an injured baby robin?

Last Answer : answer:I recommend watching for a bit longer to see if the mother eventually helps the poor little guy. If she doesn't come to his aid within a few hours, I would take him into a veterinarian. Most ... don't treat avian issues. Thanks for helping! I'll bet the little robin will appreciate it. :-)

Description : Any ideas about what to do with a robin that's established his breeding territory at the end of my house and his prime rival is his reflection in my sliding glass door?

Last Answer : I think you may find this useful. It recommends trying to put cling film or something over the outside of the glass to remove the reflection

Description : Do you suppose Medieval English longbowmen could do "trick shots" like Robin Hood?

Last Answer : I do suppose that they would become quite skilled at trick shots,much like me and my magical nine iron.:) Sooner or later one would get bored and want more of a challenge I would think

Description : Boring Question #50: Why did they call Robin, Robin when there were better birds to choose from?

Last Answer : Because the creators were big fans of Robin Hood, his original costume was inspired by the medieval look of the legendary dweller of sherwood forest, the name stuck.

Description : Is there such a thing as a definitive account of the legend of Robin Hood?

Last Answer : answer: Because the Robin Hood character is first attested in popular ballads, there is no definitive account of Robin Hood, no original story. It seems clear that many of the elements of the ... of the Sheriff. Robin is also famous for being a trickster , and he loves disguises. Mythforklore

Description : How best to care for a mother robin, or should I just let it be?

Last Answer : Okay…I was just concerned when I saw her leaving the nest a couple of times a day…I didn’t think they did that once the eggs were laid…

Description : In Desperate Housewives, does the storyline between Katherine and Robin exemplify "lesbian entrapment" or the evolution of healthy individuals in a complex relationship?

Last Answer : Dude, it’s just a show.

Description : Are you more akin to being like Batman, The Lone Ranger, and Sherlock Holmes… or do you play the supportive roll of Robin, Tonto and Watson?

Last Answer : Tonto is a fool—until he says, “What you mean ‘we’, paleface?”

Description : Have you seen a robin walking about yet this year?

Last Answer : I saw Little John the other day, but no Robin. Oh, and Batman was with him. :p

Description : Robin Hood is from Yorkshire?

Last Answer : I believe he is from Loxley, which is in South Yorkshire.

Description : What games did the famous actor Robin Williams reportedly name his children after? -Gaming

Last Answer : She was born 10 days after her father's 38th birthday. Her father stated that he named her after Princess Zelda from The Legend of Zelda video game series.

Description : Why did the state of Indiana ban Robin Hood in 1953?

Last Answer : Communist rob rich