嵌入式系统代写代做代考 Embedded Systems Tutorial questions 3

Tutorial questions 3
1. (a) A system is built from three components:
 A, which has availability of 99%
 B, which has availability of 99%
 C, which has availability of 80%
The system overall is only available if all three components A, B, C are simultaneously available. Draw the reliability block diagram for this system. Calculate the overall system availability.
(b) The system is modified by introducing a fourth component D, which replicates the functionality of C and also has availability of 80%. The overall system will be available if A, B and one or both of C or D is available. Draw the reliability block diagram for this system. Calculate the overall system availability for this modified system. What SIL level (on-demand mode) does the resulting system meet?
2. A real-time operating system is required to schedule four tasks: A, B, C, D using rate monotone scheduling. The characteristics of the tasks are shown below
Which task should be given the highest priority?
What is the total utilisation of the processor?
What conclusion can we draw about the schedulability of the problem?
3. The data sequence 1101 is sent with an appended CRC checksum computed with the generator G=1011. Generate the communicated codeword clearly indicating the data bits and appended check bits.
4. Here is a piece of C-code:
Period T
Computation time C
A
30
8
B
25
6
C
20
4
D
15
2
void main() {
uint8_t
uint8_t
uint8_t
uint8_t
x=0xF0;
x1 = x | ( (1<<2) | (1<<0) ); x2 = x1 & ~(1<<5); x3 = x2 ^ (1<<7); } What values for x, x1, x2 and x3 result when this code is run? Express your result both in binary and in hexadecimal. 5. Consider the following assembly code running on an 8-bit processor (registers and ALU are 8 bits wide). LOAD 0xFF into R1 LOAD 0xFF into R2 R3 = R1+R2 What is the resulting value in register R3? What is the integer interpretation of the values in R1, R2, R3? What is the resulting value of the status flags C, V, N and Z? 6. (a) A system requires for its construction four components A, B, C and D. The availability of component C is significantly lower than that of A, B, C. The system designers have therefore duplicated the function of C as two separate units C1 and C2; only one of them needs to be available in order for the whole system to be available. The reliability block diagram of the system is shown below: C1 A=95% A A=99.9% B A=99.9% D A=99.9% C2 A=95% The system is required to meet Safety Integrity level 2 (demand mode), i.e. availability is at least 99%. Calculate the overall availability of the system and state whether or not it meets the required SIL. (b) We have been asked to re-design the system to eliminate the need for the duplicate units of C by sourcing a more reliable version of component C which does not need to be duplicated. This results in the following system: What should the availability be for component C in order to match the availability of the system A,B,C1,C2,D used in part (a)? (c) What would be the lowest availability that component C could have in order to meet the requirements of SIL 2? A A=99.9% B A=99.9% C A=?% D A=99.9% 7. In question 2, we looked at a real-time operating system which was required to schedule four tasks: A, B, C, D using rate monotone scheduling. The characteristics of the tasks are shown below We determined that this did not meet the guarantee limit to ensure the existence of a schedule which could enable all tasks to meet their deadlines. This was because the combined processor utilisation of the tasks was too high. (a) You suspect that the code for task A may be inefficiently written, resulting in an unnecessarily long worst-case computation time. You want to investigate whether rewriting the code could result in a schedulable system. By how much would we need to improve the computation time of task A for the system to be guaranteed schedulable? (b) If the computation time of task A could be reduced to the required level, what would be the priorities of the tasks A, B, C, D? Period T (ms) Computation time C (ms) A 30 8 B 25 6 C 20 4 D 15 2