Docsity

Real-Time Systems Exam Questions for Computer Applications Students, Exams of Computer Science

Toggle sidebar
bg1
Cork Institute of Technology
Bachelor of Science (Honours) in Computer Applications - Award
(KSDEV_8_Y4)
Summer 2008
Real-Time Systems
(Time: 3 Hours)
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)
pf3
pf4
pf5

Partial preview of the text

Download Real-Time Systems Exam Questions for Computer Applications Students and more Exams Computer Science in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Science (Honours) in Computer Applications - Award

(KSDEV_8_Y4)

Summer 2008

Real-Time Systems

(Time: 3 Hours)

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:

  • An atomic action
  • A resource manager and its relationship with atomic actions.
  • The two phases of atomic actions.
  • An atomic transaction. (9 marks) (ii) Write a report to explain your understanding of atomic actions with forward error recovery. (3 marks) (b) Consider the following process set:

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

  • Reliability
  • Failure
  • Fault for real-time systems, describing the types of possible faults. (3 marks)

(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)