Question 1: a) 1 2 b) 1 2 c) 2 d) 2 e) 2 f) 3 g) 1 h) 1 i) 1 2 3 j) 2 3 Question 2: A good answer should take up the role of a kernel in a Multi-tasking approach (scheduling, context-switching, possible pre-emption). It should also mention the organization into super-loop and forground tasks. The answer should also discuss scalability issuses associated with the foreground-background approach. Questions 3: An answer is descripbed in the monitor-for-deadlocks.pdf file. It is important for the answer: * to capture the runs described in the question * be deterministic the proposed machine might miss some sequences (it is not complete, for instance, it does not capture: acq1(a) acq2(a) acq1(b). This is allowed by the question. Question 4: unsigned int tick (unsigned int current){ if ((current & 0x3F) < 59) return current + 1; unsigned int rslt = (current >> 6) & 0x7FF; if ((rslt & 0x3F) < 59) return (rlst + 1) << 6; rslt = rslt >> 6; if(rslt < 23) return (rslt+1) << 12; return 0; } Question 6: 1) utilization is 1/3+2/12+4/8= 1 2) Preemptive RMS: arrival 3: 3 . . . . . . . 3 . . . . . . . 3 . . . . . . . arrival 2: 2 . . . . . . . . . . . 2 . . . . . . . . . . . arrival 1: 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . ticks : 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 running : 1 3 3 1 3 3 1 2 3 1 3 X T2 misses its first deadline. 3) ´Non-premptive Earliest Deadline first (EDF) arrival 3: 3 . . . . . . . 3 . . . . . . . 3 . . . . . . . arrival 2: 2 . . . . . . . . . . . 2 . . . . . . . . . . . arrival 1: 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . ticks : 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 running : 1 3 3 3 3 1 1 2 2 1 3 3 3 3 1 1 2 2 1 3 3 3 3 1 4) Pre-emptive EDF: arrival 3: 3 . . . . . . . 3 . . . . . . . 3 . . . . . . . arrival 2: 2 . . . . . . . . . . . 2 . . . . . . . . . . . arrival 1: 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . 1 . . ticks : 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 running : 1 3 3 1 3 3 1 2 2 1 3 3 1 3 3 1 2 2 1 3 3 1 3 3