Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the simple embedded system and its Ada-based software solution as discussed in section 4.8 of the text. You need to redo the concurrent programming

Consider the simple embedded system and its Ada-based software solution as discussed in section 4.8 of the text. You need to redo the concurrent programming version of the software using rendezvous for process interactions with following timing constraints. The Temperature_Controller task should to be repeated every 400 milliseconds and the Pressure_Controller task should be repeated every 600 milliseconds. Message send timeout delay is 100 milliseconds for both temperature & pressure tasks. Screen task has a rendezvous timeout delay of 175 milliseconds. Clearly show the body of all three tasks. Hint: You need to declare appropriate entries, use entry calls, use SELECT and ACCEPT statements, relative and absolute delay statements & Ada.Real_Time clock package. Explain your approach & put meaningful comments in the

code.image text in transcribed

130 CONCURRENT PROGRAMMING Using a concurrent programming language In a concurrent programming langua concument activities an be identified explicily in the code: with Data Types; use Data Types with IO; use IO; with Control Procedures use Control Procedures procedure Controller is task Temp Controller task Pressure Controller task body Temp controller is TR Temp Reading HS Heater Setting; begin loop Read (TR); Temp Convert (TR, HS); Write (HS) Write (TR) end loop; end Temp Controller; task body Pressure Controller is PR Pressure Reading; PS Pressure Setting begin loop Read (PR) Pressure Convert (PR, PS) Write (PS) Write (PR) end loop; end Pressure Controller; begin Temp controller and pressure controller null have started their executions end Controller The logic of the application is now reflected in the code; the inherent parallelism the of domain is represented by concurrently executing tasks in the task so Although an improvement, one major problem remains with this data to the 130 CONCURRENT PROGRAMMING Using a concurrent programming language In a concurrent programming langua concument activities an be identified explicily in the code: with Data Types; use Data Types with IO; use IO; with Control Procedures use Control Procedures procedure Controller is task Temp Controller task Pressure Controller task body Temp controller is TR Temp Reading HS Heater Setting; begin loop Read (TR); Temp Convert (TR, HS); Write (HS) Write (TR) end loop; end Temp Controller; task body Pressure Controller is PR Pressure Reading; PS Pressure Setting begin loop Read (PR) Pressure Convert (PR, PS) Write (PS) Write (PR) end loop; end Pressure Controller; begin Temp controller and pressure controller null have started their executions end Controller The logic of the application is now reflected in the code; the inherent parallelism the of domain is represented by concurrently executing tasks in the task so Although an improvement, one major problem remains with this data to the

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago