


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this past exam are: System Diagram, System Diagram, Simple, Washing Machine, Brief Description, Real-Time System, Characteristics, Commitments, Architecture, Descriptions
Typology: Exams
1 / 4
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. (a) (i) Draw a system diagram for a simple washing machine, showing sensors and actuators. Give a brief description of each of your sensors and actuators. (5 marks) (ii) What are the characteristics of a real-time system? Explain each characteristic with your own examples. Your examples should focus on the washing machine system. (11 marks)
(b) (i) Define HRT-HOOD (you must refer to commitments and architecture in your definition). (3 marks) (ii) Give clear examples and descriptions of the 5 HRT-HOOD object types. (4 marks) (iii) For each of the 5 HRT-HOOD object types, why do you think that the object type is useful for designing real-time system software? Justify. (5 marks) (iv) “The HRT-HOOD design methodology is closely linked to the ADA language”. With clear HRT-HOOD and ADA examples, justify this statement. (6 marks)
Q2. Write an ADA program to solve the following: Sensor: Speed, Brake, Switch Actuators: Brake, Accelerator, Switch Off A simple vehicle cruise control system allows a driver to select a speed that the vehicle should be maintained at. When the driver turns on the cruise control switch, the cruise control system will attempt to maintain the current speed. The cruise control system will only operate at 80 kph or greater, therefore if the driver speed is less than this value, the switch is automatically turned off. Once the cruise control system is activated, if the speed drops 5 kph below the required speed, then the accelerator is incremented every second until the speed returns to the required speed. If the speed increases 5 kph above the required speed, then the brake is activated and the accelerator is decremented every second until the speed returns to the required speed. Cruise control terminates when the driver presses the brake, and the switch is automatically turned off. The speed sensor indicates a reading between 0 .. 160 and must be monitored every 100 ms with a deadline of 50 ms. Both the brake and switch sensors indicate a reading between 0 .. 1. The brake must be monitored every 50 ms with a deadline of 20 ms. The switch must be monitored every 200 ms with a deadline of 90 ms.
For actuators, 1 = ON, 0 = OFF
Note (1): 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.
Note (2): Do not write the code for the protected object called STATUS. Assume that this object is available, and is used to store speed, cruise speed and switch values. To access/update a value, assume methods WriteSpeed, ReadSpeed, WriteCruiseSpeed, ReadCruiseSpeed, WriteSwitch and ReadSwitch are available (with standard parameters). (33 marks)
Q5. (a) Consider the following execution sequences:
(i) Describe the ‘priority inheritance’ scheme. Illustrate with aid of a time-line diagram for the above execution sequence. (6 marks) (ii) Describe the OCPP scheme. Illustrate with aid of a time-line diagram for the above execution sequence. (6 marks) (iii) Describe the ICPP scheme. Illustrate with aid of a time-line diagram for the above execution sequence. (6 marks)
Note: E = Execution for a clock period Q = Execution with resource Q for a clock period V = Execution with resource V for a clock period (b) How may the Byzantine Generals Problem be used to solve problems where duplication of processes exist? Give a clear example illustrating your understanding of this problem. (8 marks) (c) Describe the CAN field bus. Explain its advantages and disadvantages. (7 marks)
Process Priority Execution Sequence Release Time P 1 4 (highest) EQVVE 5 P 2 1 EQQQQVE 0 P 3 3 EVVVQE 3 P 4 2 EEE 2