R 0x XXXXXXXXXX-------------------------------------------------------------------Char op;Long long int add;While(inp.eof()){Inp>>op>>hex>>add;// Simulation...

1 answer below »
Please complete in C


R 0x23242315 ------------------------------------------------------------------- Char op; Long long int add; While(inp.eof()) { Inp>>op>>hex>>add; // Simulation begins Simulate_access(op,add); // simulation ends } Print out the statistics ------------------------------------------------------------------------- Long long int tag_array[num_sets][assoc]; Long long int lru_position[num_sets][assoc]; bool dirty[num_sets][assoc]; Void Simulate_access(char op, long long int add) { Int set = (add/64)%num_sets; Long long int tag = add/64; For(int i=0; i< assoc; i++) { if(tag==tag_array[set][i]) {hit++; if(lru) update_lru(add); else update_fifo(add); } else { miss++; } } } assoc;="" i++)="" {="" if(tag="=tag_array[set][i])" {hit++;="" if(lru)="" update_lru(add);="" else="" update_fifo(add);="" }="" else="" {="" miss++;="" }="" }="">
Answered 4 days AfterMar 25, 2023

Answer To: R 0x XXXXXXXXXX-------------------------------------------------------------------Char op;Long...

Aditi answered on Mar 27 2023
29 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here