What exactly do we mean by request? In this case, a request is simply some user...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What exactly do we mean by request? In this case, a request is simply some user requesting a file from a web server, via a web browser. For example, when you go to www.google.com in your browser, you are making a network request to the web server hosting google.com. This request gets processed and eventually, the results are sent back to your browser to be displayed. In this assignment, we will look at how we can simulate this process, representing the server as a queue of requests that need to be processed. In the printer example, the printer can print x number of pages per second. In our case, each request will have its own 'processing time', which is the amount of time that is needed for the server to process this request. Also, in the real world, a server can process more than one request at a time, since servers typically have more than one CPU. However, just like the printer simulation, we can assume for now that the server only processes on request at a time. In essence, this assignment is very similar in structure to the printing simulation. Therefore, it is highly recommended to read over the printer simulation section again. This biggest difference between this and the printing simulation is that we will not be generating requests at random, but reading them from a file. This will help keep results consistent and easily testable. Part I - Implement Simulation with One Server To help outline a solution, you will have a Server class and a Request class. This are akin to the Printer and Task class in the reading. You will need to update these classes to represent the problem at hand. What exactly do we mean by request? In this case, a request is simply some user requesting a file from a web server, via a web browser. For example, when you go to www.google.com in your browser, you are making a network request to the web server hosting google.com. This request gets processed and eventually, the results are sent back to your browser to be displayed. In this assignment, we will look at how we can simulate this process, representing the server as a queue of requests that need to be processed. In the printer example, the printer can print x number of pages per second. In our case, each request will have its own 'processing time', which is the amount of time that is needed for the server to process this request. Also, in the real world, a server can process more than one request at a time, since servers typically have more than one CPU. However, just like the printer simulation, we can assume for now that the server only processes on request at a time. In essence, this assignment is very similar in structure to the printing simulation. Therefore, it is highly recommended to read over the printer simulation section again. This biggest difference between this and the printing simulation is that we will not be generating requests at random, but reading them from a file. This will help keep results consistent and easily testable. Part I - Implement Simulation with One Server To help outline a solution, you will have a Server class and a Request class. This are akin to the Printer and Task class in the reading. You will need to update these classes to represent the problem at hand.
Expert Answer:
Answer rating: 100% (QA)
Part I Implement Simulation with One Server To implement the simulation with one server we can use the following steps Create a Request class with the following attributes requestid A unique identifie... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
Read this article, "In Sneaker Wars, It's Also Curry (Under Armour) vs. James (Nike) In Sneaker Wars, Think about a time when a celebrity endorsement influenced you to buy a product in the last five...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
At the current year-end, a company shows the following unadjusted balances for selected accounts. a. After an analysis of future sales discounts, the company estimates that the Allowance for Sales...
-
For the frame and loading shown, determine the components of all forces acting on member ABE. 6 kips 4.8 ft B. 2.4 ft 3,6 ft +3.6 ft -3.61- 1.2 ft
-
Identify and sketch the graph of each surface. y 2 + z 2 = 1 + x 2
-
A study in one state compared the traffic fatality rates (number of fatalities per miles driven) on highways with 55, 65, and 75 miles per hour speed limits. They found that highways with a 75 mph...
-
Salem Inc, reported the following data: Net income ............$168,750 Depreciation expense .......... 18,750 Gain on disposal of equipment .... 15,375 Decrease in accounts receivable ..... 10,500...
-
a. Journalize, record, and post the following transactions as needed to the sales, purchases, cash receipts, cash payments, and general journals. All terms are 2/10, n/30 on both sales and purchases....
-
Problem 2: A single-piece bicycle crank is shown below under the following loading scenario: the rider is pedaling forward by applying a vertical force Fp = 500 N on the left pedal and no force on...
-
As a U.S. exporter you have just sent an invoice for 600,000 Euros payable in 60 days. The current exchange rate is $1.07 per Euro. The 60-day forward rate is $0.99 per Euro. What is the value of the...
-
Consider 3 neighbors (Ben, Jill and Lisa) deciding whether or not to have a streetlight inthe neighborhood. The light costs $600. They agree in advance that if the light is provided they would share...
-
Consider that the demand for potato chips is Q = 8000 1000P and the supply of potato chips is Q = 2000P - 4000. [a.] What is the price consumers pay and the quantity traded (the amount consumers'...
-
Name a strategy that you could do to try to keep young females engaged in physical activity as they enter adulthood. How can you contribute to community programming to serve as a role model for the...
-
Are markets truly ever in equilibrium where there is no tendency for either quantity demanded or quantity supplied to change? Explain. Justify your explanation by providing at least one real-life...
-
Debt Management 2 0 2 2 2 0 2 1 2 0 2 0 1 0 0 , 0 9 6 , 2 0 8 , 3 2 9 1 0 4 , 3 0 2 , 5 7 6 , 8 7 2 1 0 4 , 3 0 6 , 8 2 3 , 0 9 2 1 1 5 , 4 7 2 , 0 6 2 , 6 8 1 1 2 1 , 7 3 9 , 4 9 4 , 3...
-
You are provided with two fishes, Sardine and Shark . How do you classify them? What are the main differences between them?
-
Vectors are drawn from the center of a regular n-sided polygon in the plane to the vertices of the polygon. Show that the sum of the vectors is zero.
-
Webster, Inc., dealt in automobile accessories at wholesale. Although he manufactured a few items in his own factory, among them windshield wipers, Webster purchased most of his inventory from a...
-
In this products liability case, the plaintiff contends that she was badly burned by hot coffee purchased from the drive-through window of a fast food restaurant, when the coffee spilled on her after...
-
This is a stocklist case arising under 220(b) of our [Delaware] General Corporation Law. The issue is whether a shareholder states a proper purpose for inspection under our statute in seeking to...
-
Define and distinguish between an open and a closed adoption.
-
Define and distinguish between an independent and an agency adoption.
-
Define and give an example of an equitable adoption.
Study smarter with the SolutionInn App