Browse Source

Nearly finished Simu2

Joshua Rutschmann 8 years ago
parent
commit
13ab224ea1
No account linked to committer's email address
1 changed files with 27 additions and 6 deletions
  1. 27
    6
      hw5/simu2/ANSWERS.md

+ 27
- 6
hw5/simu2/ANSWERS.md View File

@@ -1,18 +1,39 @@
1 1
 # Antworten
2 2
 
3 3
 1. 
4
-   Figure 8.1: A Single Long-Running Job
4
+   **Figure 8.1: A Single Long-Running Job**
5 5
 
6 6
    `./mlfq.py -l 0,200,0`
7 7
 
8
-   Dieser Aufruf erzeugt einen Job der bei Zeit t=0 startet, 200ms läuft und keine IO-Time hat.
8
+   Dieser Aufruf erzeugt einen Job der bei Zeit t=0 startet, 200ms läuft und keine IO-Time hat.
9 9
 
10
-   Figure 8.2: 
10
+   **Figure 8.2: Along Came a Short Job**
11 11
 
12 12
    `./mlfq.py -l 0,200,0:120,20,0`
13 13
 
14
-   Job 0 startet bei t=0 mit 200ms Runtime und Job 1 springt bei t=120 für 20ms ein (10 ms Priority 2 + 10ms Prority 1). Wenn man nun das "alte" t=20 als neuen Zeitpunkt 0 sieht, dann hat man das Beispiel aus der Vorlesung.
14
+   Job 0 startet bei t=0 mit 200ms Runtime und Job 1 springt bei t=120 für 20ms ein (10 ms Priority 2 + 10ms Prority 1). Wenn man nun das "alte" t=20 als neuen Zeitpunkt 0 sieht, dann hat man das Beispiel aus der Vorlesung.
15
+   
16
+   **Figure 8.3: What About I/O?**
17
+   
18
+   `./mlfq.py --jlist 0,180,0:100,20,0 -Q 10,10,10`
19
+   
15 20
 
16
-2. Indem man den Scheduler mit `-m 1` auf nur eine Queue einstellt. Dann werden neue Jobs nicht in eine höhere Queue gestuft und die Priorität auch nicht erhöht.
21
+2. Indem man den Scheduler mit `-m 1` auf nur eine Queue einstellt. Dann werden neue Jobs nicht in eine höhere Queue gestuft und die Priorität auch nicht erhöht.
17 22
 
18
-3.
23
+3. Mit dem Aufruf `./mlfq.py -S -l 0,200,0:0,800,99 -c -q 100 -i 1` wird der erste Job bei t=100 von dem 2.ten zu 99% unterbrochen, welcher Regel 4b ausnutzt und auf Priorität 2 bleibt. Man sieht dass **JOB 1** 99 Ticks abarbeitet, dann darf **JOB 0** ein Tick abarbeiten und der Kreislauf wiederholt sich:
24
+
25
+```
26
+[ time 198 ] Run JOB 1 at PRIORITY 2 [ TICKSLEFT 1 RUNTIME 800 TIMELEFT 701 ]
27
+[ time 199 ] IO_START by JOB 1
28
+IO DONE
29
+[ time 199 ] Run JOB 0 at PRIORITY 1 [ TICKSLEFT 99 RUNTIME 200 TIMELEFT 99 ]
30
+[ time 200 ] IO_DONE by JOB 1
31
+[ time 200 ] Run JOB 1 at PRIORITY 2 [ TICKSLEFT 99 RUNTIME 800 TIMELEFT 700 ]
32
+[ time 201 ] Run JOB 1 at PRIORITY 2 [ TICKSLEFT 98 RUNTIME 800 TIMELEFT 699 ]
33
+[ time 202 ] Run JOB 1 at PRIORITY 2 [ TICKSLEFT 97 RUNTIME 800 TIMELEFT 698 ]
34
+```
35
+
36
+
37
+4.
38
+
39
+5. Bei Workloads bei denen mehr als ein Job auf einer Queue läuft hat diese Option ein Effekt.

Loading…
Cancel
Save