Sjf

11,726
-1

Published on

Published in: Business, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
11,726
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
131
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Sjf

  1. 1. SJF
  2. 2. <ul><li>First: </li></ul><ul><li>nonpreemtive </li></ul>
  3. 3. <ul><li>Four processes arrive on the same time </li></ul>
  4. 4. 6 sec
  5. 5. 6 sec 4 sec
  6. 6. 6 sec 4 sec 8 sec
  7. 7. 6 sec 4 sec 8 sec 3 sec
  8. 8. 6 sec 4 sec 8 sec 3 sec
  9. 9. 6 sec 4 sec 8 sec 3 sec
  10. 10. 6 sec 4 sec 8 sec 3 sec
  11. 11. 6 sec 4 sec 8 sec
  12. 12. 6 sec 8 sec
  13. 13. 6 sec 8 sec
  14. 14. 8 sec
  15. 15. 8 sec
  16. 16. <ul><li>Second: </li></ul><ul><li>preemptive </li></ul>
  17. 18. At time 0: P1 start
  18. 19. At time 2: P2 arrive P2 needs 4 sec P1 still needs (7-2)= 5 sec
  19. 20. At time 2: P2 needs 4 sec P1 still needs (7-2)= 5 sec
  20. 21. At time 2: 4 sec < 5 sec
  21. 22. At time 2: So, Begin P2
  22. 23. At time 4: P3 arrive P3 needs 1 sec P2 still needs (4-2)= 2 sec
  23. 24. At time 4: P3 arrive P3 needs 1 sec P2 still needs (4-2)= 2 sec
  24. 25. At time 4: 1sec < 2 sec
  25. 26. At time 4: So, Begin P3
  26. 27. At time 5: P4 arrive P4 needs 4 sec P2 still needs (4-2)= 2 sec P1 still needs= 5 sec
  27. 28. At time 5: P4 arrive P4 needs 4 sec P2 still needs (4-2)= 2 sec P1 still needs= 5 sec
  28. 29. At time 5: 2 sec < 4sec< 5sec
  29. 30. At time 5: So, Return to P2
  30. 31. At time 7: P2 finish P1 stitt needs = 5 sec P4 needs = 4 sec
  31. 32. At time 7: P2 finish P1 stitt needs = 5 sec P4 needs = 4 sec
  32. 33. At time 7: 4sec< 5sec
  33. 34. At time 7: So, begin to P4
  34. 35. At time 11: P4 finish no more process
  35. 36. At time 11: So, return to P1
  36. 37. <ul><li>وكمثال ملموس لهذه الطريقة : </li></ul><ul><li>لو كنتِ في متجر .. وأردتِ شراء كيس من الخبز فقط .. ثم ذهبتِ إلى المحاسب , ولكن لسوء حظك !! وجدتِ أمامك شخصاً قد ملأ سلة كاااملة من المشتريات  !! </li></ul><ul><li>ولكن عندما يرى المحاسب انك ستحاسبن على الخبز فقط .. قد يستأذن من صاحب السلة .. فيحاسبك ثم يعود إليه .. </li></ul>
  37. 38. <ul><li>كُتب بواسطة : </li></ul><ul><li>صفا البلاع </li></ul>

×