Design: The Smart Home contractors Builders we saw in the previous assignments have now landed an actual
Question:
Design: The Smart Home contractors Builders" we saw in the previous assignments have now landed an actual project. They are asked to install a full Heating, Ventilation and Air Conditioning (HVAC) solution for a small lab space owned by the water quality testing lab company "Water Bros Inc.". The lab space consists of:
122 labs hosting sensitive measuring and analysis equipment, 122 office spaces with cubicles for the technicians and doctors, a board and meeting room, a mail room and a sample storage room Smart Builders must deploy their HVAC devices so that the temperature is always controlled. It turns out that their clients had very specific requirements which they presented in detail below. Specifically they want room temperature to be reliably sensed 199,999% of the time, to be able to detect faulty components (temperature sensors, AC, Furnace) within 1 minute and detect temperature changes from any sensor within 20 seconds. Two major activities of the software design process include Software Architecture and Detailed Design. Demonstrate on how these two activities being executed? (1) Do you design software when you "write" a program? What makes software design different from coding? (2.1) What is the goal of software design? What would be different if developers went straight to coding without adhering to software design principles?Demonstrate on how these two activities being executed? Explain the difference between 'y' and "xy" when used as constants in C. Describe the memory representation of both values. [4 marks] (b) Consider the following C program: void swap(int x, int y) { int temp = x; x = y; y = temp; } int main(int argc, char **argv) { int x = 0; int y = 1; swap(x, y); assert(x == 1); return 0; } Briefly explain the role of the assert statement and why this program will trigger an assert failure when executed. Supply two modified versions of the program that alter the swap function definition and, if necessary, its calls, to avoid this assert failure. One version should be in C, and the other should use C++ language features. [4 marks] (c) Describe the address-space layout (highlighting four areas of memory) of a typical compiled x86 C program, and how each of these areas are used by C constructs. [8 marks]
Design Design Concept Smart Builders thought carefully about Water Bros' problem. They propose a solution that has the following characteristics:
All the above (AC, Furnace, Thermostat, Controller) are or are controlled through an attached Raspberry Pi connected through Wifi or Ethernet and allowing access to functionality through Java RMI. For temperature sensors, Smart Builders are considering two possibilities: OmniTempSensorXS3 [$22100 each], which measures temperature in one location. The sensor is also attached to a Rasberry board which can, in turn, connect through Wifi or Ethernet and Java RMI. The sensor offers correct readings (i.e., is available) 99% of the time. SeriousTempBus from Serious Temp Inc. [$150 each] come with a controller (of proprietary board and operating system implementing full TCP/IP stack) and one (1) passive battery operated sensor detached from the controller and regularly transmitting temperature information to the controller via a 800 Mzh frequency and using a proprietary wireless protocol. SeriousTempBus does not implement SSDCS, but can be controlled through commands over TCP/IP connections (pretty much like HTTP or IMAP); they call the protocol TAP (Temperature Awareness Protocol). The sensor offers correct readings (is available) 99% of the time. The sensors are supposed to be used in a configuration that meets the requirements (room temperature to be reliably sensed 99,999% of the time, to be able to detect faulty components (temperature sensors, AC, Furnace) within 1 minute).
What to Do Make design decisions that allow Water Bros achieve their quality objectives (accuracy, fault detection and tolerance). Your design decisions include: The choice between SeriousTempBus and OmniTempSensorXS13 for each room and where they are placed. How many controllers, sensors and in what configurations should they be. Decide how you are going to support the availability requirements for sensors. 21. Go to the Architecture Definition Document template below and produce descriptions and models that describe the above problem. 1 Executive Summary [[Summary of what this document is about]] There are four independent furnaces and four independent ACs in the lab. One Furnace and one AC unit for each of the two labs. One Furnace and one AC unit for the sample room. One Furnace and one AC unit for the rest of the rooms (utilizing existing airducts). Each of the labs and the sample room must have several temperature sensors. One thermostat controls all the rooms.
ummarize any issues connected with left-or right-cooperative administrators in the two methods (in executing the parser and in developing the apparatus) you illustrated to some degree (e).(i) Define what unspecified behaviour means in the C standard and give two examples of such behaviour. [3 marks] (ii) Briefly explain why it is important to have unspecified behaviour in the definition of the C language. [1 mark] (b) Compare and contrast the struct and union keywords in C, supplying an example of a situation where it would be more appropriate to use a union rather than a struct. [4 marks] (c) Explain the following C or C++ language concepts. You may find it helpful to use short code fragments or diagrams to illustrate your answer. (i) The virtual keyword used to qualify a C++ member function and its impact on generated code. [4 marks] (ii) The role of the C preprocessor in the source-code compilation cycle, and why it is a useful tool for debugging. [4 marks] (iii) Templated functions in C++, giving one benefit and one drawback of using them compared with using a void* function in C. [6 marks] (b) ALGOL 60 provided call by value and call by name, Pascal provided call by value and call by reference, and ALGOL-W provided a variety of calling methods including call by result and call by value-result. Briefly describe the calling mechanisms just mentioned and discuss why most modern programming languages provide only call by value. [8 marks] (c) Discuss the reasons why languages such as Fortran, Algol and PL/I designed in 1950s and 1960s are less widely used than languages designed in the last 20 years. [6 marks] 3 [TURN OVER CST.2004.3.4 5 Operating Systems II (a) What problem do real-time scheduling algorithms try to solve? [2 marks] (b) Describe one static priority and one dynamic priority real-time scheduling algorithm. You should discuss the issue of admission control, and comment on the data structures that an implementation would need to maintain and on how these would be used to make scheduling decisions.are a data structure protected by a mutual exclusion lock. Define machine epsilon (m). [3 marks] (d) Assume x = y = z = m. Using worst-case analysis, estimate xy, xy. Find an expression for w where w = z xy. [4 marks] (e) Working to 4 significant decimal digits only, compute w when x = 2.02218, y = 2.22008, z = 4.02258. Given m ' 0.25 1203 , how many significant decimal digits of w can be relied on? [3 marks] on of a Turing machine that is specified by a quintuplet description. [4 marks] (c) Define the configuration of a Turing machine at step t, and establish equations that specify the configuration of a k-symbol Turing machine at step (t + 1) in terms of the configuration at the previous step t. [6 marks] (d) Explain how you would use your equations to simulate a specific Turing machine by a register machine whose program encodes the quintuplet description.
To what extent does this support Turing's Thesis? [Explicit program for a register machine is not required.] [8 marks] 8 Computer Graphics and Image Processing Describe an algorithm for performing scan conversion of a set of 3D polygons, including details of clipping, projection, and the underlying 222D polygon scan conversion algorithm. You may assume that you are given the colour of each polygon and that no lighting calculations are required. Please state any additional assumptions that you need to make. Ray tracing is not an acceptable answer to this question. [20 marks] 5 [TURN OVER CST.2004.3.6 9 Introduction to Security (a) Explain briefly mechanisms that software on a desktop computer can use to securely generate secret keys for use in cryptographic protocols. [5 marks] (b) Give two different ways of implementing residual information protection in an operating system and explain the threat addressed by each. [5 marks] (c) Consider the standard POSIX file-system access control mechanism: (i) Under which conditions can files and subdirectories be removed from a parent directory? [2 marks] (ii) Many Unix variants implement an extension known as the "sticky bit". What is its function? [2 marks] (iii) On a POSIX system that lacks support for the "sticky bit", how could you achieve an equivalent effect? [2 marks] (d) VerySafe Ltd offer two vaults with electronic locks. They open only after the correct decimal code has been entered.
Technical Considerations The components that Smart Builders consider to use are: Furnace to be used is SaharaFurnaceLL50. AC used is PolarFrostB15 by Polar Works Inc. Thermostat Interface is ThermoSetX19. Their custom-made Controller.
Introduction to Finance Markets, Investments and Financial Management
ISBN: 978-1119398288
16th edition
Authors: Ronald W. Melicher, Edgar A. Norton