3/29/2017 Final Exam 2010 • Problem 3‐ Software Execution Model (36 marks) ABC airlines maintains a Web site that provides static content with information about the company, along with dynamic functions. All users are allowed to: • Check the status of today’s flights • Request information on flight schedules, fares, and availability • Purchase tickets Members of Frequent Flyer Club (Elite) are able to: • Get current information about the status of their account (number of miles flown to date this year, number of miles available for award travel, most recent flights taken) • Purchase tickets for multiple trips using either frequent flyer miles or a credit card In order to ensure privacy and prevent unauthorized use of frequent flyer miles, access to frequent flyer accounts will require that the Elite member login by entering an account number and a personal identification number (PIN). When Elite members login, they will see a custom home page tailored to the preferences entered on their Member Profile form (e.g., showing specials on travel to Vancouver) and their flying habits (e.g., most frequent flight segments) as stored in the member history database. Members may update their Member Profiles online. The on‐line system consists of several components displayed in the physical UML diagram as shown in Figure 1. The static pages are stored in the web server. The dynamic functions are executed in the application server. The member history and ticket information are stored in the database server. 1 3/29/2017 Figure 1: Component Diagram of the ABC Airline On-Line System Use Case Diagram 2 3/29/2017 Sequence Diagram – Purchase ticket Sequence Diagram – getFlightPlanningPage 3 3/29/2017 Basic Execution Graph Notation SOFT 437 – Course Review 7 Sequence Diagram – Purchase ticket 4 3/29/2017 Software Execution Model Representation SOFT 437 9 Example 6‐2 Arrival rate, λ Mean service time, S 0.4 jobs per sec 2 sec We then calculate the following average values: Throughput, X = λ Utilization, U = XS S RT Residence time, 1U Queue length, N = X * RT SOFT 437 – Course Review 10 5 3/29/2017 Utilization on Multiple Resources • Utilization of single resources U=X * S Utilization of multiple resources Ui = U/m SOFT 437 – Course Review 11 Service Demand Law • The service demand on a device i Di Vi Si Ui Di X0 SOFT 437 – Course Review 12 6 3/29/2017 • Problem 4 A Web server has one CPU and one disk. It receives two types of HTTP requests: for small text files and for image files. The average arrival rates are 5 requests/sec for text files and 2 requests/sec for image files. The service times for the CPU and the disk are given below. Arrival Rate (tps) Service Demands (sec) CPU Disk Utilizations (%) CPU Disk Residence Time (sec) CPU Disk Response Time Average number of requests Text request Image Request 5 2 0.1 0.08 0.1 0.15 SOFT 437 – Chapter 6 14 7 3/29/2017 Arrival Rate (tps) Service Demands (sec) CPU Disk Utilizations (%) CPU Disk Residence Time (sec) CPU Disk Response Time Average number of requests Text request 5 Image Request 0.1 0.08 0.1 0.15 50 40 20 30 2 0.3 0.27 0.57 2.87 SOFT 437 – Chapter 6 15 Problem 6 – Capacity Planning (12 marks) Consider a three-tier site, which consists of a web server, an application server and a database server. The CPU service demand for the application server is 268.3 msec. Table 1 lists the processing speedups and the forecasted number of the transactions for the web site for the next 3 years. At the beginning of year 2, a new algorithm is used to improve the performance of the processing in the application server. The service demand is reduced to 26% of the service demand in year 1 if the new algorithm is use. Year 1 2 3 Processing Speedup 1.00 1.60 2.56 Volume of Transactions (tps) 14 19 23 Table 1: CPU Processing Speedup and Transaction Growth Assumptions 1) Show the CPU demands for the application server vary from year 1 to year 3 (6 marks) 1) What is the required number of the CPUs to reduce the utilization to an average of 50% over all CPUs in the application server in year 1? (6 marks) 8 3/29/2017 Problem 7 – Performance Principles, Patterns and Anti-patterns (26 marks) 1) Describe the follow concepts and give an example on each concept Design Pattern Performance Pattern Software Anti-pattern Performance Anti-pattern Refactoring (10 marks) 1) Describe the four independence principles marks) Centering Fixing-point Locality Processing versus frequency (8 1) Compare the following two solutions from the point of view of the independent performance principles. Which solution is better - why? (8 marks) Solution 1: Write a transformation program that reads the storage structure of tool A and replaces certain elements by the corresponding elements required by the storage structure of tool B. Intermediate structures are used to keep the temporary result of the transformations. The intermediate structures are stored in a temporary file. Solution 2: Use a transformation generator that requires the following input: the grammar of the format required by tool A, the grammar of the format required by tool B, transformation rules between the grammars. The generator generates the software that constructs a tree structure from the input file, transforms it into the corresponding tree structure of the output file and produces the output file. The input file follows the grammar of tool A, the output file follows the grammar of tool B, and the transformation is done using the input transformation rules. 9 3/29/2017 1) www.travel.com is an Internet-based travel agency. It has localized sites for 15 countries outside US. It books airline tickets, hotel reservations, car rental, cruises, vacation packages, and various attractions. It also recommends related services when a user selects a trip. For example, hotel information and car rental companies in the destination are automatically listed in the web page once the flight tickets are selected. Figure 2 shows a screenshot of the home page of www.travel.ca web site localized to the users from Canada. Here is the list of the performance independence principles: centering fixing-point locality processing vs. frequency Explain how the performance independence principles are applied in the design of the web site. 10
© Copyright 2026 Paperzz