开发者

Round robin algorithm in operating system

I just wanted to make sure that what I am doing is right.

I am working for my midterm and I got old midterms from my friend, there is one question in regarding Round Robin secluding algorithm. It has following information. Time slice is 2.

Job No       Arrival Time      CPU Time

1             0                 8

2             4                 4

3             5                 3

4             6                 1

5            7                  5

I am asked to draw Gantt chart from above information.

(I am not sure how I can show it here, but bellow is one try. I am not good at formating tools)

Job 1 || 1 || 2 || 3 || 4 || 5 || 1 || 2 || 3 || 5 || 1 || 5 ||

Time 0-2| 2-4 | 4-6 | 6-8 | 8-9 | 9-11 | 11-13 | 13-15 | 15-16| 16-18 | 18-20| 20-21

You can read like below (Sorry for inconvenience)

Job 1 starts at 0 and ends at 2 at first interval and then it continues till 4, later job 2 starts at 4 and ends at 6. Thanks for开发者_JAVA技巧 help in advance.


You could do something like this:

1 XXXX_______XX_____XX.
2 ....XX_______XX......
3 ....._XX_______X.....
4 ......__X............
5 .......__XX_____XX__X

X = Active
_ = Queued

I think that's the basic form of a Gantt chart. Just show what each job is up to throughout the time period.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜