



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Instructions Answer any THREE questions. Note: Question 1 = 34 marks All other questions = 33 marks Real-time Systems Reference Booklet Available.
Examiners: Dr. J. Creagh Dr. M. O Cinneide Mr. M. Donnelly
Q1. As part of the security system of a large building, the entrance gates are managed by the system. When the owner arrives, a sensor detects the vehicle. The owner may use a remote control to cause the gates to open. The gates are opened. A sensor is required to detect that the gates are fully open. The vehicle now passes. A separate sensor detects that the vehicle has entered into the premises. If the light sensor detects poor light, then the lights are turned on when a vehicle is detected and the lights remain on for 10 minutes after the vehicle has passed.
(a) Write a HRT – HOOD design for the security system. (12 marks)
(b) Write an ADA program for sensor that detects that the vehicle has entered into the premises. The program must deal with closing the gates and turning off the lights after 10 minutes. The vehicle detector sensor indicates a reading of 0 or 1 and must be monitored every 250ms. For actuators 1 = ON, 0 = OFF or 1 = OPEN, 0 = CLOSED. Note: A register called ‘CSR’ controls the hardware. Refer to the reference booklet. A second register ‘READING’ is provided for reading a value from a sensor. A third register ‘WRITING’ is provided for writing a value to an actuator. (14 marks)
(c) Write the ADA code for the protected object LightStatus. Choose appropriate methods and parameters. Comments are required. This object keeps a record of the light value. (8 marks)
Q2. (a) “OS-9 provides a complete development environment for the development of embedded systems. This includes HAWK and OS-9 on the target”. Discuss. Firstly, list a set of points that you wish to make. Then, expand on each point in your list. Clear examples required. (14 marks)
(b) Consider a simple embedded system for managing the automatic opening and closing of windows in a greenhouse complex. (i) Draw a diagram of the system. (2 marks) (ii) From a programming viewpoint, explain why OS-9 is suitable for implementing such a system. Firstly, list your points (4 points required). Then, explain/justify each point you make. (11 marks)
(c) What are the main advantages of using signals with OS-9 real-time programs? Give examples. (6 marks)
Q4.(a) (i) Define the following:
Process T D C P 1 24 21 8 P 2 6 4 2 P 3 8 5 1
(i) Test for schedulability using the utilisation-based schedulability test. (4 marks) (ii) Test for schedulability using the response time analysis with deadline test. (11 marks) (c) Consider the following execution sequence:
Process Priority Execution Sequence Release Time P 1 3 (highest) EQQQ 4 P 2 1 EEEEE 0 P 3 2 EQQQE 2
Describe the ICPP scheme. Illustrate with aid of a time-line diagram for the above execution sequence. Note: E = Execution for a clock period Q = Execution with resource Q for a clock period. (6 marks)
Q5. (a) (i) Describe the major sources of faults in real-time systems. (2 marks) (ii) Describe the terms
(iii) Classify the “failure modes” for real-time systems. (4 marks)
(b) Write the structure of an ADA program that illustrates an implementation technique for Recovery Blocks. (7 marks)
(c) (i) Why is the CAN field bus useful for some classes of real-time systems? (3 marks) (ii) Explain the CAN mechanism via an example: 4 nodes U, V, W and X each transmit a single message at the same time; however, the priorities of the messages are 14 for U, 7 for V, 5 for W and 12 for X. Briefly, describe how CAN works with reference to the above example. (8 marks)
(d) For distributed systems, a global time model may be used on physical time. Describe an implementation of this scheme and give a clear example. (6 marks)