process shedulling algorithem about computer, Exercises of Human Memory

its about process scheduling in cpu.

Typology: Exercises

2016/2017

Uploaded on 05/08/2017

almas-yaseen
almas-yaseen 🇵🇰

1 document

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1



 !"
#$

%%$
&'(&) $*

+
,
-

 !"
./%0
/%01
 2) 3
/
%43
*3

.
54.
044.1
4&1
+ 
0!"6 0
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download process shedulling algorithem about computer and more Exercises Human Memory in PDF only on Docsity!

    

   !"

  # $

 %  % $

  

 &'(&) $*

   

 + 

 , 

  

    -

 * 3     .  5  4.  0 4 4. 1   4  &    1   +      0 !" 6   0   

    7

The final schedule (Gantt chart):

0

P1 (24)

24 27

P2 (3) P3 (4)

P1 waiting time: 0 P2 waiting time: 24 P3 waiting time: 27

The average waiting time:

What if P1 arrives at time 2

31

    9

  /$   

 =$   

   44  6 5/ = : < 

 ; 3

    @

- A 

0 3

P4 (3) (^) P1 (6)

9

P3 (7)

16

P4 waiting time: 0 P1 waiting time: 3 P3 waiting time: 9 P2 waiting time: 16

The total time is: 24

The average waiting time (AWT):

P2 (8)

24

Do it yourself

    A

- A 

(^0 )

P1 (6) P4 (3)

14

P3 (7)

21

P1 waiting time: 0 P2 waiting time: 6 P3 waiting time: 14 P4 waiting time: 21

The total time is the same.

The average waiting time (AWT):

(comparing to 7)

P2 (8)

24

Do it yourself

    B

 # 4 

?$ 

 $    (^3) -



 

  

  0 

  :  

- - -

0 10

P1 (10)

P1 waiting time: 0 P2 waiting time: 8

The average waiting time (AWT):

P2 (2)

2 (p2 arrives) 12

Do it yourself

    

 ?$5 

.   

    

 / 

 0  . !  "    $  4 . 

 4   

 &%   $   

 %    

  )$  %  ) $  &'(&) $*      +   ,    

    

 ?$    1 

 5    1 

   ?$ 5  1

 %    ?$    )

  8 :D:  1  

  $

 & $;

   

A

    >

   !4 55* 5     $  "

 : ! 5"

   1

   41

 

  4/E    1

    

 :     

 &  85