Question
solve attached A matrix of 32-bit integers, x[512][32] (i.e. 512 rows with 32 elements per row) resides at memory address 3EA4000 on a machine with
solve attached
A matrix of 32-bit integers, x[512][32] (i.e. 512 rows with 32 elements per row) resides at memory address 3EA4000 on a machine with a virtual memory system that employs a page size of 8192 bytes. Assume that the amount of physical memory available to contain pages from the matrix is 32768 bytes, and that an LRU page replacement algorithm is used.Initially, all page map table entries are invalid (i.e., none of the required pages are in memory). The following high level nested loops are used to add the constant 1 to each element in the matrix:
for (j = 0; j
for (k = 0; k
}
a) Considering only the page faults generated in referencing the matrix (i.e., ignoring those that might result from instruction fetches or from referencing the loop indices), indicate how many page faults occur in executing the code if the matrix is stored in column-major order (as used with the Fortran language or with Matlab).
b) Considering only the page faults generated in referencing the matrix (i.e., ignoring those that might result from instruction fetches or from referencing the loop indices), indicate how many page faults occur in executing the code if the matrix is stored in row-major order (as used with the C language or with Java)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started