Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
Loading in …5
×

# Sjf

12,588 views

Published on

Published in: Business, Technology
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

### 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>