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
(Bachelor of Science in Computer Applications – Award)
(NFQ – Level 8)
Summer 2005
Real-Time Systems
(Time: 3 Hours)
Answer any THREE questions.
Note: Question 1 = 34 marks.
All other questions = 33 marks.
Examiners: Dr. J. Creagh
Dr. D. Chambers
Mr. P. O’Connor
Mr. E. A. Parslow
Q1. (a) (i) List each of the phases of the ROPES lifecycle. List each of the sub-phases.
Describe each sub-phase in detail, giving an example(s) to clearly illustrate your
understanding of the sub-phase. (10 marks)
(ii) Give a detailed diagram illustrating “A single iteration pass along with the
generated artifacts”. Explain your diagram. (7 marks)
(b) (i) Describe the different types of Petri-Nets giving clear examples. (4 marks)
(ii) With a clear series of examples, explain what a ‘conflict’ is with Petri-Nets.
Should a conflict be allowed to develop for a real-time system? Explain. (5 marks)
(iii) A simple dishwasher system has the following cycle:
pump water in add powder heat water
spray water (for 10 minutes)
empty water input water
spray water (for 5 minutes)
empty water
Firstly, list the actuators and sensors.
Then, design a simple Petri-Net solution for the dishwasher cycle. (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

(Bachelor of Science in Computer Applications – Award)

(NFQ – Level 8)

Summer 2005

Real-Time Systems

(Time: 3 Hours)

Answer any THREE questions.

Note: Question 1 = 34 marks. All other questions = 33 marks.

Examiners: Dr. J. Creagh Dr. D. Chambers Mr. P. O’Connor Mr. E. A. Parslow

Q1. (a) (i) List each of the phases of the ROPES lifecycle. List each of the sub-phases. Describe each sub-phase in detail, giving an example(s) to clearly illustrate your understanding of the sub-phase. (10 marks)

(ii) Give a detailed diagram illustrating “A single iteration pass along with the generated artifacts”. Explain your diagram. (7 marks)

(b) (i) Describe the different types of Petri-Nets giving clear examples. (4 marks)

(ii) With a clear series of examples, explain what a ‘conflict’ is with Petri-Nets. Should a conflict be allowed to develop for a real-time system? Explain. (5 marks)

(iii) A simple dishwasher system has the following cycle: pump water in add powder heat water spray water (for 10 minutes) empty water input water spray water (for 5 minutes) empty water

Firstly, list the actuators and sensors. Then, design a simple Petri-Net solution for the dishwasher cycle. (8 marks)

Q2. (a) “OS-9 provides a foundation for embedded real-time products”. Referring to OS-9, the development system and the OS-9 kernel, explain in detail why this statement is true. (7 marks)

(b) OS-9 process scheduling utilises many queues. (i) Describe each of the OS-9 queues and give detailed examples of use. (5 marks) (ii) Describe the advantages and disadvantages of each queue. (5 marks)

(c) (i) Write a C/C++ OS-9 program to send the contents of variable “struct CommData MyData” from process 1 to process 2 via pipe “/pipe/test”. Also write the receiving process, which displays the received data. Struct CommData { int x; int y; int z; }; Choose your own sample data.

Note: When using OS-9 function calls, only the key parameters should be used. (6 marks) (ii) What is the main problem with using pipes as a form of communication for real- time systems? (3 marks)

(d) Describe how to structure a process in OS-9 so that it may receive/handle signals. Give an example where signal numbers 300, 320, and 420 are dealt with. (7 marks)

Q4. (a) Consider the following process set:

Process T D C P 1 22 20 9 P 2 5 3 2 P 3 9 7 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)

(b) Consider the following execution sequences:

Process Priority Execution Sequence Release Time P 1 1 EVVVVVE 0 P 2 3 EQQVVE 3 P 3 4 (highest) EVVQE 4 P 4 2 EEE 2

(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

Q5. Write an ADA program to solve the following real-time problem: Sensors: Day Light Sensor, Fog Sensor, Wind Sensor Actuators: Alarm, Warning Lights, Lights An automatic runway monitoring system constantly monitors weather related sensors. The system controls an alarm and warning lights as follows: Fog Sensor Wind Sensor Action Required

= 50 Alarm + Warning Lights = 80 Alarm + Warning Lights = 40 Warning Lights = 70 Warning Lights Otherwise, the alarm and warning lights are turned off. A jitter value of 3 is required for the fog and wind sensor values. The system controls the lights as follows: Day Light Sensor Fog Sensor Turn Lights ON < 20 yes 40 yes < 30 < 30 yes

Otherwise, the lights are turned off. A jitter value of 4 is required for the day light and fog values. The Day Light sensor indicates a reading between 0 .. 50 and must be monitored every 680 ms with a deadline of 300 ms. The fog sensor indicates a reading between 0 .. 95 and must be monitored every 1.5 seconds with a deadline of 300 ms. The wind sensor indicates a reading between 0 .. 160 and must be monitored every 500 ms with a deadline of 300 ms. For actuators (lights, alarm, warning lights) 1 = ON, 0 = OFF. Note (1): Do not write the code for the protected object called STATUS. Assume that this object is available, and is used to store the day light, fog and wind values. To access/update a value, assume methods WriteDayLight, ReadDayLight, WriteFog, ReadFog, WriteWind and ReadWind are available (with standard parameters). Note (2): 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. (33 marks)