Question

In: Computer Science

Here is a series of address references given as word addresses: 18, 19, 27, 16, 21,...

Here is a series of address references given as word addresses: 18, 19, 27, 16, 21, 0, 64, 48, 19, 11, 19, 22, 4, 27, 6, and 27. Assuming a direct-mapped cache with 16 one-word blocks that is initially empty, label each reference in the list as a hit or a miss and show the final contents of the cache.

Solutions

Expert Solution

Solution:

Given,

=>Number of blocks = 16

=>Direct mapped cache is used.

=>Addresses = 18, 19, 27, 16, 21, 0, 64, 48, 19, 11, 19, 22, 4, 27, 6 and 27

Explanation:

=>In direct mapped cache we use mapping function i % B = p where i is the address, B is the number of blocks in cache, p is the block number in cache in which main memory address will be mapped, % is modulus function.

=>By default we use LRU(least recently used) algorithm.

Mapping addresses:

18:

=>18 % 16 = 2 => block 2 => Miss

19:

=>19 % 16 = 3 => block 3 => Miss

27:

=>27 % 16 = 11 => block 11 => Miss

16:

=>16 % 16 = 0 => block 0 => Miss

21:

=>21 % 16 = 5 => block 5 =>Miss

0:

=>0 % 16 = 0 => block 0 => Miss(replace 16 with 0)

64:

=>64 % 16 = 0 => block 0 => Miss(replace 0 with 64)

48:

=>48 % 16 = 0 => block 0 => Miss(replace 64 with 48)

19:

=>19 % 16 = 3 => block 3 => Hit

11:

=>11 % 16 = 11 = > Block 11 => Miss(replace 27 with 11)

19:

=>19 % 16 = 3 => block 3 => Hit

22:

=>22 % 16 = 6 => block 6 =>Miss

4:

=>4 % 16 = 4 => block 4 =>Miss

27:

=>27 % 16 = 11 => block 11 => Miss(replace 11 with 27)

6:

=>6 % 16 = 6 => Block 6 => Miss(replace 22 with 6)

27:

=>27 % 16 = 11 => block 11 => Hit

Final cache content:

48 18 19 4 21 6 27

     0         1     2              3           4         5         6      7 8 9 10    11    12 13 14 15

I have explained each and every part with the help of statements attached to the answer above.


Related Solutions

For the stress data given below with the nearest error of 1: 27-17-11-24-36-13-29-22-18 23-30-12-46-17-32-48-11-18 18-32-26-24-38-24-15-13-13 18-21-27-20-16-15-37-19-19...
For the stress data given below with the nearest error of 1: 27-17-11-24-36-13-29-22-18 23-30-12-46-17-32-48-11-18 18-32-26-24-38-24-15-13-13 18-21-27-20-16-15-37-19-19 a) Construct a frequency distribution table. b) Construct the three types of statistical graphs. c) Determine the (1) Mean, (2) Median, (3) Mode, (4) Range, Variance, and (6) Standard Deviation.
MT scores: 11, 11, 16, 17, 19, 20, 21, 21 23 24 24 26 26 27...
MT scores: 11, 11, 16, 17, 19, 20, 21, 21 23 24 24 26 26 27 27 28 28 28 29 30 31 31 32 33 35 37 38 38 39 42 44 Questions for Class MT Score Distribution Analysis 1. Create a boxplot of MT scores. 2. Compute the probability that a randomly selected student from the class scored higher than 20. 3. Are the MT scores normally distributed? Why or why not? 4. Assuming a normal fit, compute...
MT scores: 11, 11, 16, 17, 19, 20, 21, 21 23 24 24 26 26 27...
MT scores: 11, 11, 16, 17, 19, 20, 21, 21 23 24 24 26 26 27 27 28 28 28 29 30 31 31 32 33 35 37 38 38 39 42 44 Questions for Class MT Score Distribution Analysis 1. Create a histogram of MT scores. 2. Describe the shape of the MT scores distribution. 3. Compute the mean and standard deviation. 4. Compute the 5-number summary. 5. Create a boxplot of MT scores. 6. Compute the probability that...
17, 18, 18, 18, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22,...
17, 18, 18, 18, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 23,23, 24,24,24,24,24,24,24,24,25,26,26,26,26,26,26,27,27,27,27,27,28,28,29,31,31,32,32,34,35,38 use the data to do the following: 1. sample mean 2. median 3. mode 4. standard deviation
Buffalo Boston 26 23 27 14 39 11 23 19 17 19 16 4 21 9...
Buffalo Boston 26 23 27 14 39 11 23 19 17 19 16 4 21 9 31 12 1 12 23 7 32 32 32 26 24 21 42 16 38 16 29 18 16 16 12 20 29 20 16 11 18 10 27 18 2 11 21 17 35 20 21 20 29 25 24 16 17 17 21 8 38 21 9 24 31 26 16 27 24 18 24 17 13 15 21 21 21 32...
Given the sample data. x: 21 19 15 30 27 (a) Find the range. Range =...
Given the sample data. x: 21 19 15 30 27 (a) Find the range. Range = 15 (b) Verify that Σx = 112 and Σx2 = 2,656. Σx = Σx2 = (c) Use the results of part (b) and appropriate computation formulas to compute the sample variance s2 and sample standard deviation s. (Round your answers to two decimal places.) s2 = s = (d) Use the defining formulas to compute the sample variance s2 and sample standard deviation s....
Given the sample data. x: 21, 19, 13, 32, 27 (a) Find the range. (Enter an...
Given the sample data. x: 21, 19, 13, 32, 27 (a) Find the range. (Enter an exact number.) (b) Verify that Σx = 112 and Σx2 = 2,724. (For each answer, enter an exact number.) Σx =   (c) Use the results of part (b) and appropriate computation formulas to compute the sample variance s2 and sample standard deviation s. (For each answer, enter a number. Round your answers to two decimal places.) s2 =   s =   (d) Use the defining...
18) For the network 192.168.140.68/27 determine: a)     All the subnets b)     Address ranges c)...
18) For the network 192.168.140.68/27 determine: a)     All the subnets b)     Address ranges c)     Host ranges d)     Network IDs e)     Broadcast addresses
Given the following numbers:   25 16 61 18 15 20 15 20 24 17 19 28,...
Given the following numbers:   25 16 61 18 15 20 15 20 24 17 19 28, derive the mean, median, mode, variance, standard deviation, skewness, kurtosis, range, minimum, maximum, sum, and count. Interpret your results. What is the empirical rule for two standard deviations of the data?
Given the following numbers: 25 16 61 18 15 20 15 20 24 17 19 28,...
Given the following numbers: 25 16 61 18 15 20 15 20 24 17 19 28, derive the mean, median, mode, variance, standard deviation, skewness, kurtosis, range, minimum, maximum, sum, and count. Interpret your results. What is the empirical rule for two standard deviations of the data?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT