## Round Robin Algorithm

# 1
Round Robin Algorithm

Hey, guys

 Job Running time Priority A 10 3 B 6 5 C 2 2 D 4 1 E 8 4

All 5 jobs have the same arrival time.

The question is, what is the average waiting time according to Round Robin algorithm. Quantum = 1 min.

The answer that was given by a teacher:
(B+E+A+C+D)+(B+E+A+C)+ (B+E+A)+ (B+E+A)+ (B+E+A)+ (B+E+A)+ (E+A)+ (E+A)+ (A+A)/5 = 5.4

According to all information that I have read, waiting time for this question is 15.2. Where from the number 5.4 came from? Is this the real answer?

This is a question from my exam and its really bugging me.

Sorry for possible dumb question. I was reading questions in homework help section and was really embarrassing to ask this simple thing there.

Thanks
 Anne_Stark View Public Profile for Anne_Stark Find all posts by Anne_Stark
# 2
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
 zaxxon View Public Profile for zaxxon Find all posts by zaxxon

Difficulty: Easy
The communication protocol NFC stands for Near-Field Control.
True or False?

## Round Robin Scheduling via UCONTEXT.H

Hi I am implementing Round Robin Scheduling using ucontext.h functions. Well i am using my own logic for round robin but i am stuck at one point. I am using swapcontext for shifting from one process to another. Now how do i get to know that after 4 sec(Round Robin Time) where the process has...

## Round up the decimals

Hi All, I would like to do the following in the shell script 561.76 to 562 I tried using this echo 'scale=0; 749 * 75 /100 ' | bc but just returned only 561 Please help me . I appreciate your help Thanks rajeevm

## Round off the a Decimal value.

HI, I have a script which is used to calculate the Memory & CPU utilization a server. memx=`ssh -l siebel1 \${f} /usr/sbin/prtconf|grep -i 'Memory size'|tr -s " "|/usr/xpg4/bin/awk -F" " '{print \$3 * 1024}'` v5=`ssh -l siebel1 \${f} vmstat 1 2 | tail -1 | tr -s " " | /usr/xpg4/bin/awk -v...

## Round Robin Distribution of Contents of file to 3 files

Hi I need to create a script that distributes in round robin fashion the contents of a file to 3 files. The number of lines in a content of file can vary from 1-n(Each line is just a one letter word).The entire lines needs to get distributed into 3 files ( The order doesnt matter) , at...

## Round with awk

Hi, I have a problem. Basically I dont know how to use awk. I have a script (below) which works fine. What I want to do is somehow "pipe" in the input say 4.5 and have it give the anwer, I dont want ot have to type it in, since it will be running in a script. Any ideas how to do this???? ...

## Round the column value :

Hi .... Iam having the file ....in which 3rd column is numerical having 8 decimal part... i want that to cut to 2 decimal part ... Source File : E100|0|19940.10104030|0|1ABC E103|1|19942.10195849|3|0ABC E100|0|19943.10284858|0|1ABC I want to be ...... Reulst: ...

## writing files to a dir in round robin order

I have a list of directories. (say a1,a2,a3,a4,a5) I need to get the directory last modified and access the next one to put some files over there (say if a3 is the latest dir modified ie, last time files were put into a3, this time I need to move the files in a4)…and if a5 is the last modified...

## how to round a value

Hello, In a unix shell script,i want to round a variabele to a nearest number Ex: set count=104.4 How can i round that to 105.? Thanks, Sateesh

## Round Robin Scheduling

Hi, first post. Well, here goes: Ok, so I need to build a round robin scheduling algorithm. I understand HOW the algorithm works and I can write it down/show you on paper if you were to ask me "how does the RR scheduling algorithm work?" Only problem is that I'm having a hell of a time...