問題描述
任何人都可以詳細(xì)說明 - 系統(tǒng)內(nèi)存中的緩沖區(qū)和緩存有什么區(qū)別?
Can anybody detail - What is the difference between Buffer and Cache in system memory?
推薦答案
buffer 只是一個容器,用于在任何給定時間比消費(fèi)者更多的數(shù)據(jù)進(jìn)入時在短時間內(nèi)保存數(shù)據(jù)可以使用/處理.這是一種先進(jìn)先出的情況 - 數(shù)據(jù)進(jìn)來,可能會被緩沖,然后在一段時間后按照進(jìn)來的順序出去.
A buffer is just a container to hold data for a short period of time when more comes in at any given time than a consumer can use / process. It's a first-in, first-out situation - the data comes in, might be buffered, and goes out in the same order it came in, after a while.
緩存是用于加速某些操作的存儲.事物被放入緩存中,并且應(yīng)該從其中多次、一遍又一遍地檢索.沒有流經(jīng)緩存"的機(jī)制——數(shù)據(jù)不會以相同的順序進(jìn)出——但它只是一個保存容器.訂單可能是任何東西,真的 - 項目是通過一個鍵來尋址的,它們不會流過"但它們被放入"并留在那里(直到它們因為不被使用而被丟棄,或者因為系統(tǒng)下降).
A cache is a storage for speeding up certain operations. Things get put in a cache, and should be retrieved from it multiple times, over and over again. There's no "flowing through the cache" kind of mechanism - data doesn't come in and go out in the same order - but it's just a holding container. The order might be anything, really - items are addressed via a key, they don't "flow through" but they are "put in" and stay there (until they're thrown out because of not being used, or because the system goes down).
這篇關(guān)于緩沖區(qū)和緩存的區(qū)別?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!