C program to work with hit or miss
$30-250 USD
Πληρώθηκε κατά την παράδοση
To compare the benefits of various cache organizations while performing matrix transpose operations, where spatial locality is not ideal. You will use test the cache operations using the program given below:
Consider the following transpose routine:
typedef int array [16][16];
void transpose1 (array dst, array src) {
int i, j;
for(i=0; i<16; i++) {
for (j=0; j<16; j++ ) { dst[j][i] = src[i][j];
} }
}
Assume that this code runs on a machine with the following properties:
• sizeof(int) == 4
• The src array starts at address 0 and the dst array starts at address 1024 (0x400)
• There is a single L1 cache that is direct-mapped, write-through, write-allocate, with a block size
of 16 bytes.
• The cache has a total size of 64 data bytes and is initially empty.
• Accesses to the src and dst arrays are the only sources of read and write misses.
For each row and column, indicate whether the access to src[row][col] and dst[row][col] is a hit (h) or a miss(m). Reading src[0][0] is a miss and writing dst[0][0] is also a miss.
1. Generate a cache simulator program in c, to which addresses are passed, that determines whether an access of the address results in a cache hit or miss.
2. Your program must include a capability to vary the cache and block sizes. Your code will use bit operations to determine the set number and block offsets. Your cache implementation will need to store tag information and time of use information.
3. Your initial tests will use a cache size of 128 data bytes and a block size of 16 bytes.
4. You will test direct mapped, two-way set associative, and four-way set associative cache configurations using the matrix transpose operation. (You will use an LRU replacement strategy.)
5. Your cache will be write-through and write-allocate and the src and dst arrays are the only sources of read and write misses, respectively.
Ταυτότητα Εργασίας: #22434600
Σχετικά με την εργασία
2 freelancers κάνουν προσφορές κατά μέσο όρο $85 για αυτή τη δουλειά
Dear I read your project description and I am very interested in your project. ❤️Thanks for giving me the opportunity to bind on your project.❤️ Have a strong background on OS, Kernel, Shceduling, C++, Compiler, dat Περισσότερα