Question
CACHE MEMORY REPLACEMENT ALGORITHM Caching in a computer system is a very important optimization medium but it is limited by space, frequently accessed process are
CACHE MEMORY REPLACEMENT ALGORITHM
Caching in a computer system is a very important optimization medium but it is limited by space, frequently accessed process are registered in the cache memory from the RAM, due to the limitation of space, when the cache memory is full and there is need for caching the operting system has to create space on the cache, this is called the replacement algorithm. In this problem, you are required to write a program that will accept the following:
1) Size of the cache
2) Number of the processes
3) Sizes of the processing in the order of arrival into the CPU
When the define cache size is exhausted and there are more process to the cached, the new processes size should be compare with all the processes in the cache for the size that best fits the new process should replace it. If no process fit then clear enough space from the beginning until the process fits.
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