HAIDER SHAHZAIB The Principles of Operating System
Q # 2 ==> Give two reasons why caches are useful. What problems do they solve? What problems do they cause? If a cache can be made as large as the device for which it is caching (for instance, a cache as large as a disk), why not make it that large and eliminate the device?Two reasons why they are useful are as follows:- Cache is a relatively fast memory, so getting some data from cache is faster than getting it from main memory or secondary memory. Cache are particularly useful when two or more components needs to exchange data - transfer speeds are much faster when using cache, and the transfer can be done without using the main memory. Therefore, we see that cache solve the transfer problem - transfer speeds are much faster when using cache, so the component receiving data from some other component does not have to wait as long as it would have to if we didn’t use cache. Notice that this means that ache improves the efficiency of the whole system. The main problem caused by cache are inconsistency (When data is changed in the main memory or in the memory of some component, the data in cache must also be updated) and the cache misses ( if the data is not in the cache we lost the time for checking if the data is located in the cache, and we lose some additional time to transfer the data to the cache). The main problem with the use of bigger caches is that faster memories are more expensive. Therefore, such enormous cache wouldn’t be affordable.
Written for
- Institution
- HAIDER SHAHZAIB The Principles of Operating System
- Course
- HAIDER SHAHZAIB The Principles of Operating System
Document information
- Uploaded on
- October 25, 2023
- Number of pages
- 15
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
haider shahzaib the principles of operating system