Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. # CS4410 HW4 Regrade Request
  2. by Austin Liu and Jared Wong
  3.  
  4. ## Introduction
  5.  
  6. ## Explanation of Q1
  7. ### 1.2 LIFO
  8. For this problem, we were given +0.5 for having the right Tail completion time but nothing else. I will show how we calculated our Scheduling Order and Average Completion time.
  9.  
  10. For our scheduling order, at time t=0 and according to our table, tasks 0, 4, 7 all come in. By stated assumption 2 (copied here for your convenience):
  11.  
  12. ```
  13. In the case of ties in FIFO + LIFO scheduling (if two tasks arrive at the same time),
  14. we say the task with the smaller i came first.
  15. ```
  16.  
  17. Because 0, 4, and 7 all come in at the same time, and 0 < 4 < 7, then we assume that the actual order that the tasks enter is given by the total ordering 0 -> 4 -> 7. As such, at time t=0, the last job to enter was task 7. Thus, we select task 7 to do first.
  18.  
  19. Then when 7 completes, it will be time t=8. Once again, by the table given, the length of time that 7 goes for, l_i, is 8. Furthermore, we stated in assumption 1 that:
  20.  
  21. ```
  22. Assume that everything except SRTF is solved WITHOUT PREEMPTION, AS IS MENTIONED ON PIAZZA
  23. ```
  24.  
  25. Because there is no preemption, 7 will run to completion before anything else can happen. If we run a task of length 8 at time t=0, then the time at which we finish is given by 0+8, which should be 8.
  26.  
  27. At time t=8, all of our jobs have entered. There is no i for which s_i > 8. All jobs have entered, so we simply complete them in the reverse of the order that they have entered.
  28.  
  29. At time t=0, we had 0 -> 4 -> 7, but we already completed 7, so we just have 0 -> 4
  30. At time t=1, we had 5 -> 8, and by stated assumption 2, we order them as 5 -> 8
  31. At time t=3, we had 1
  32. At time t=5, we had 2 -> 6 -> 9, and by stated assumption 2, we order them as 2 -> 6 -> 9
  33. At time t=7, we get 3
  34.  
  35. From all of these partial orderings, we get the total ordering of
  36. 0 -> 4 -> 5 -> 8 -> 1 -> 2 -> 6 -> 9 -> 3
  37.  
  38. Once again, because this is LIFO (which stands for Last In First Out), we take the last task that came in and process it first. As such, we get that the scheduling order is
  39. 7 -> 3 -> 9 -> 6 -> 2 -> 1 -> 8 -> 5 -> 4 -> 0
  40.  
  41. This answer matches exactly what we wrote in our solution. By the assumptions that we stated before the problem, this is how we can derive the result.
  42.  
  43.  
  44. ### 1.3 SJF
  45.  
  46. ### 1.4 SRTF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement