In this exercise we show the definition of a web server log and examine code optimizations to improve log processing speed. Th e data structure for the log is defined as follows:

Chapter 5, Exercises #19

This problem has been solved!


Do you need an answer to a question different from the above? Ask your question!
In this exercise we show the definition of a web server log and examine code optimizations to improve log processing speed. Th e data structure for the log is defined as follows:

struct entry { int srcIP; char URL[128]; // request URL (e.g. , “GET index.html

Assume the following processing function for the log:

topK_sourceIP (int hour);

1. Which fields in a log entry will be accessed for the given log processing function? Assuming 64-byte cache blocks and no prefetching, how many cache misses per entry does the given function incur on average?

2. How can you reorganize the data structure to improve cacheutilization and access locality? Show your structure definition code.

3. Give an example of another log processing function that would prefer a different data structure layout. If both functions are important, how would you rewrite the program to improve the overall performance? Supplement the discussion with code snippet and data.
For the problems below, use data from €œCache Performance for SPEC CPU2000 Benchmarks€ (http://www.cs.wisc.edu/multifacet/misc/spec2000cache-data/) for the pairs of benchmarks shown in the following table.

a. Mesa / gcc
b. mcf / swim

4. For 64 KiB data caches with varying set associativities, what are the miss rates broken down by miss types (cold, capacity, and conflict misses) for each benchmark?

5. Give an example in the miss rate table where higher set associativity actually increases miss rate. Construct a cache configuration and reference stream to demonstrate this.

Related Book For answer-question

Computer Organization and Design The Hardware Software Interface

5th edition

Authors: David A. Patterson, John L. Hennessy

ISBN: 978-0124077263