Tutorial solutions 3
1. (a) The probability that A, B, C are available at the same time is 99% ¡Á 99% ¡Á 80% = 78.4%
System availability = 99%¡Á99%¡Á80%=78.4%
(b)
The combination C, D is unavailable if both C and D are unavailable at the same time. So (1-ACD) = (1-AC) (1-AD) = 0.2 ¡Á 0.2. So ACD = 96%
The overall system is available if A, B and the CD combination are simultaneously available. The probability of this is
99%¡Á99%¡Á 96%=94.1%
This would be acceptable at SIL 1 (system failure could cause minor injuries)
2. (a) The initial system is:
Total utilisation is 8/30 + 6/25 + 4/20 + 2/15 = 84%
The guarantee bound for 4 tasks is 4 ¡Á (21/4-1) = 75.7%
The tasks do not meet the guarantee bound, so it is possible that tasks could miss their deadline.
A A=99%
B A=99%
C A=80%
C A=80%
A A=99%
B A=99%
D A=80%
Period T (ms)
Computation time C (ms)
A
30
8
B
25
6
C
20
4
D
15
2
3. The binary generator is 1011
The length of a generator is r+1, where r will be the number of CRC bits we append. In this case r=3.
Our data is 1101. We initialise by appending r 0s, then compute the remainder after division (modulo 2):
1011)1101000
1011
1100 1011
1110 1011
1010 1011 001
Givesacodeword=1101001 (first4bitsareinformationandlast3arecheckbits)
4. x = 11110000 = 0xF0 x1 = 11110101 = 0xF5 x2 = 11010101 = 0xD5 x3 = 01010101 = 0x55
5. R1 = 0b11111111
R2 = 0b11111111
R3 = 0b11111110 = 0xFE
If the values are interpreted as signed (i.e. declared in the C code as int8_t)
then R1=-1, R2=-1, R3=-2
If the values are interpreted as unsigned (i.e. declared in the C code as uint8_t)
then R1=255, R2=255, R3=254
N=1 (the final result is negative)
Z=0 (the final result is not zero)
V=0 (there is no signed overflow: the correct final result is representable within 8-bits) C=1 (the result of unsigned addition is too large to represent in 8-bits)
6. (a) The combination C1, C2 will only be unavailable if C1 and C2 are both unavailable at the same time. The probability of this is (1-0.95)2 = 0.0025
The probability that C1, C2 is available is therefore 1-0.0025 = 0.9975.
So the overall availability of the system A,B,C1,C2,D is 0.999¡Á0.999¡Á0.999¡Á0.9975=0.99451
This exceeds 99% and thus meets the requirement of SIL2 (b) 99.75%
(c) Let the availability of C be denoted by AC.
The overall availability of the system A,B,C,D is therefore 0.999¡Á0.999¡Á0.999¡ÁAC¡Ý0.99 So AC = 99.3%
7. (a) The initial system is:
Period T (ms)
Computation time C (ms)
A
30
8
B
25
6
C
20
4
D
15
2
The guarantee bound for 4 tasks is 4 ¡Á (21/4-1) = 75.7%
The tasks do not meet the guarantee bound, so it is possible that tasks could miss their deadline.
To get within the guarantee bound, we need CA/30 + 6/25 + 4/20 + 2/15 ¡Ü 75.7% (where CA is the worst case computation time for task A measured in ms). This gives CA ¡Ü 5.5 ms
(b) The priorities are unchanged: D highest, then C, then B, then A. The priorities are determined by the deadline period, not the computation time.