Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the computer caching mechanism?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how the computer caching mechanism is". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The following figure shows the flow of a computer processing program.

1. Related concepts

Physical Ihop 0: transfer from hard disk to memory (① and ④)

Transfer of logical I/0:CPU to memory (② and ③)

Cache hit ratio: the ratio of logical Imax O to total Imax O (logical + physical). The greater the cache hit ratio, the greater the need for caching. Memory is the largest cache in a computer system.

Cache read: after starting the program, data and programs are transferred from the hard disk to memory and then to CPU through various caches

Cache write: CPU writes the program to memory and then to the hard disk without any cache, so there is no cache write.

two。 Caching mechanism

As shown in the figure below, there are registers, level 1 cache and level 2 cache in cpu. Memory is the largest cache, and there are storage cache and hard disk cache in the storage.

Cache speed: register > level 1 cache > level 2 cache > memory > storage cache > hard disk cache

As mentioned above, from hard disk to memory to cpu is cached, which is called cache read. The modified data in cpu is written to the hard disk without caching, so the cache write is not triggered. But in a computer system, there are two places where cached writes can be triggered:

Memory of ① Oracle database

When the Oracle database software starts, it will set aside a space in the system memory for oracle memory, in which oracle can realize cache write.

The cache stored in ② can cache writes

There is a battery in the storage that powers the storage cache so that if the power goes out, the storage cache can continue to work.

When the storage is powered off, because the storage battery continues to power the storage cache, the storage cache will write the data to the flash memory, which ensures that the data in the storage will not be lost. Therefore, the storage of the battery is very important!

This is the end of the content of "how the computer caching mechanism is". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report