Question: C program Make sure it runs please and well documented You already have got some idea about Memory Hierarchy. In the memory hierarchy if the

C program Make sure it runs please and well documented

C program Make sure it runs please and well documented You already

have got some idea about Memory Hierarchy. In the memory hierarchy if

the processoricpu needs some data, it searches the data in the following

You already have got some idea about Memory Hierarchy. In the memory hierarchy if the processoricpu needs some data, it searches the data in the following way: Cache->Memory->Disk In this assignment you have to implement some kind of demo memory hierarchy using c code Assume that you have cache, memory and disk of size 4 blocks, 16 blocks and 256 blocks respectively. Each block of the cache, memory and disk contains 4 bytes of data (which is equivalent of the size of one integer). So, whenever processor requests for some data, the transfer is made in blocks To incorporate the scenario into your demo memory hierarchy code, you can define your cache, memory and disk in terms of array. Say for example: Int cachel4] Int memory[16]: Int disk[2561 Initially only the disk would have some value. The value of each array would be: disk: Value 01 2 3 4 5 6 7 8 9 1011 12255 memory Index 0 1 2 3 4 5 6 7 8 910 11 12 13 14 15 Value cache Index

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!