Please bear with me , these questions may be very basic . I am just trying to understand the fundamentals.
-
Are the cache eviction algorithms such as LRU are implemented by the OS ?? if so , how can we find out the current algorithm being used and is it possible for the programer to change it ?
-
Since cache is along with processor , the read and write policies are hardcoded or the operating system decides it ?
-
Are there separate caches for data and instructions ? or do they share the same cache ?
-
What are the algorithms currently employed in operating systems to solve cache coherency problem ?
Thanks for your patience in answering my questions.
- Sethu
Just one answer? Well
1.) No hardware implemented. They should be documented by the vendor, if not then microbenchmarking is an option.
2.) Hardware
3.) As pointed out above L1 cache has separate caches for data and instruction. There is also TLB for virtual memory.
4.) I attended a course last semester which covers these topics. The slides are available online: http://www.systems.ethz.ch/education/past-courses/hs09/mmdbms