What is Cache Memory. Types and functions of cache memory?

What is Cache Memory. Types and functions of cache memory?

Cache Memory

Cache Memory

The Cache Memory is the Memory which is very near to the central processing unit , all the Fresh Commands are Stored into the Cache Memory. The Cache Memory is committed for storing the input which is given by the user and which is essential for the CPU to Implement a Task. But the Capacity of the Cache Memory is too small in compare to Memory and Hard Disk.

Prominence of Cache memory

The cache memory lies in the path between the processor and the memory. The cache memory consequently, has lesser access time than memory and is faster than the main memory. A cache memory have an access time of 100ns, while the main memory may have an access time of 700ns.

The cache memory is very expensive and hence is limited in capacity. Earlier cache memories were available separately but the microprocessors contain the cache memory on the chip itself.

The need for the cache memory is due to the mismatch between the speeds of the main memory and the CPU. The CPU clock as discussed earlier is very fast, whereas the main memory access time is comparatively slower. Hence, no matter how fast the processor is, the processing speed depends more on the speed of the main memory (the strength of a chain is the strength of its weakest link). It is because of this reason that a cache memory having access time closer to the processor speed is introduced. 

The cache memory stores the program (or its part) currently being executed or which may be executed within a short period of time. The cache memory also stores temporary data that the CPU may frequently require for manipulation.

The cache memory works according to various algorithms, which decide what information it has to store. These algorithms work out the probability to decide which data would be most frequently needed. This probability is worked out on the basis of past observations.

It acts as a high speed buffer between CPU and main memory and is used to temporary store very active data and action during processing since the cache memory is faster than main memory, the processing speed is increased by making the data and instructions needed in current processing available in cache.
types of cache memory

A computer can have different levels and sizes of cache depending on the CPU architecture. The most common levels of cache are L1 and L2 cache, where L1 is closest to the Cpu and hence its access time is much faster compared to L2 cache , the sizes of these caches can vary from 8Kb - 128kb or even 256Kb in modern systems.

Another mode of caching is Disk Caching

Disk caching works under the same principle as memory caching, but instead of using high-speed SRAM, a it uses conventional main memory. The most recently accessed data from the hard drive (as well as adjacent sectors) is saved in a memory buffer. When a program needs to access data from the disk, it first checks the disk cache to see if the data is there. Disk caching can dramatically improve the performance of software. Because accessing a byte of data in RAM can be thousands of times faster than accessing a byte on a hard disk.

The effectiveness of any cache is determined by its hit rate. The higher the hit rate the better the performance of cpu and the better the caching algorithm implemented.

Two most common algorithm for caching are

· Least Frequently Used (LFU): This cache algorithm uses a counter to keep track of how often an entry is accessed.
· Least Recently Used (LRU): This cache algorithm keeps recently used items near the top of cache.

Recall: A lower size cache with high hit ratio, is far better than a large size cache with poor hit ratio. 

A CPU cache is a cache used by the central processing unit (CPU) of a computer to reduce the average time to access data from the main memory. The cache is a smaller, faster memory which stores copies of the data from frequently used main memory locations. Most CPUs have different independent caches, including instruction and data caches, where the data cache is usually organized as a hierarchy of more cache levels (L1, L2, etc.). 


Author:

Facebook Comment

Tags

Ideas Internet Tips updates Blogging Education Software new Mobiles What’s New Online Design life SEO other HEALTHY LIFE Computer health Green Living us mattress Sleep Mattresses best mattress inexpensive mattresses for sale king size mattress size (Green Living) Make Money online e-learning mattress sizes single mattress deals sleep mattress best type of mattress for side sleepers mattress selector tool mattress size memory foam mattress nectar mattress reviews Project:LOVE NATURE be green best memory foam mattress building green buy sleep double bed spring mattress price go green home remedies for good sleep how to get a good night sleep mattress dealers mattress mattress tips on how to sleep through the night 2019 web development trends 4Sleep 7 day programmable thermostat Bamboo Vs Cotton Bed Sheets Bamboo vs. Cotton Best Advice for Choosing The Best Sleep Best Sleep Mattress For Back Pain Choose a Best Sleep Mattress for Your Preferred Sleep Position Eco Friendly Products That Really Make a Difference Eco-Friendly Eco-Friendly Tips for Saving Money Green Kitchen Helix Know the History Facts About the Memory Foam Mattress Mother's Day 2018 Mother's Day Best Unique Gift Ideas 2018 NASA Memory Foam Technology POS (Point of Sale) Receipt Printer Printer Spring Mattress The Basics of Cryptocurrency Why Choose to Go Eco-Friendly? (Green Living) adjustable beds amerisleep as3 aviya azza mattress bedroom beds for sale best mattress for sleep apnea best mattresses for back pain best websites 2019 casper mattress cheap mattress choose a mattress for back pain choose mattress india choose mattress usa digital thermostat dozebeds eco friendly eco friendly cooking eco friendly electric stove eco friendly kitchen appliances eco friendly living room eco friendly living tips eco friendly paper eco friendly things in our house go green images good night's sleep meaning green living show green news honeywell thermostat how to be a web designer from home how to become a professional web designer how to become a web designer from home how to become web designer career how to choose a mattress for back pain how to choose a web designer how to choose sleep mattress how to make your home environmentally friendly how to sleep better at night naturally king mattress leed certification canada leed certification checklist leed certification cost leed certification exam leed certification wiki leed platinum buildings loom & leaf make your home green mattress mattress america reviews mattress buying guide mattress for kids memory foam density guide memory foam mattress buying guide memory foam mattress information memory foam mattress reviews minimalist web design 2019 naturally needle mattress new website trends 2019 nomad mattress programmable thermostat home depot queen mattress revive mattress revive mattress r2 saatva should i buy a memory foam mattress sleep at night fast sleep mattress near me sleep mattress reviews sleep mattress usa sleep number bed smart thermostat spring mattress king size spring mattress pocket spring mattress india spring mattress price sustainable living communities the matress thermostat thermostats top web design trends 2019 twin mattress viola ways to go green web design trends 2019 website trends for 2019 what is a green apartment which mattress is good spring or coir or foam winkbeds zenhaven