Skip to main content

What is cache memory?


Cache Memory is also known as SRAM (Static RAM). And I assume you the full form of RAM.
So, why cache memory is used in Computer?

Hmm, Nice question.
As we know data is transferred from secondary memory to primary memory for making change in the file. And from primary memory it goes to the CPU via Bus for execution.
CPU is so fast that the data transfer RAM become slow for the CPU. As result CPU remain idle most of the time.
So, to optimize the usage of the CPU, cache memory was introduced.
Cache memory is hardware memory which store the instructions that are executed frequently by the system.
To understand the concept of cache memory?
Let’s take an example:

 Suppose, CPU is at Point A, Cache memory is at point B and RAM is at point C.
So, who will require more time to reach to CPU?
Point B or C?
Obviously, B(Cache) because its closure to CPU.
It will require less time to transfer data to the CPU.Because it is nearer to CPU.
When a process is executed CPU check whether the instruction are stored in  the cache memory or not if yes then it executed direct through cache memory as result time get saved.


The basic operation of a cache memory is as follows:
  • When the CPU needs to access memory, the cache is examined. If the word is found in the cache, it is read from the fast memory.
  • If the word addressed by the CPU is not found in the cache, the main memory is accessed to read the word.
  • A block of words one just accessed is then transferred from main memory to cache memory. The block size may vary from one word (the one just accessed) to about 16 words adjacent to the one just accessed.
  • The performance of the cache memory is frequently measured in terms of a quantity called hit ratio.
  • When the CPU refers to memory and finds the word in cache, it is said to produce a hit.
  • If the word is not found in the cache, it is in main memory and it counts as a miss.
  • The ratio of the number of hits divided by the total CPU references to memory (hits plus misses) is the hit ratio.




Comments

Popular posts from this blog

Secure Network(Week 4)

Network hardening is the process of securing a network by reducing its potential vulnerabilities through configuration changes and taking specific steps.   Implicit deny is a network security concept where anything not explicitly permitted or allowed should be denied. Analyzing logs is the practice of collecting logs from different networks and sometimes client devices on your network, then performing an automated analysis on them. Correlation analysis is the process of taking log data from different systems and matching events across the systems. Flood guards provide protection against Dos or denial of service attacks. EAP-TLS is an authentication type supported by EAP that uses TLS to provide mutual authentication of both the client and the authenticating server.   if you really want to lock down your network, you can implement 802.1x . DHCP Snooping Attack Why WEP Encryption fall apart? A general concept in security and encryption is to never send the plain ...

Troubleshooting and debugging

Troubleshooting is the process of identifying, analyzing, and solving problems.  Debugging is the process of identifying, analyzing, and removing bugs in a system. We sometimes use troubleshooting and debugging interchangeably.  But generally, we say troubleshooting when we're fixing problems in the system running the application, and debugging when we're fixing the bugs in the actual code of the application. Debuggers let us follow the code line by line, inspect changes in variable assignments, interrupt the program when a specific condition is met, and more. System calls are the calls that the programs running on our computer make to the running kernel.   A reproduction case is a way to verify if the problem is present or not. Where to check for log file in OS? On Linux , you'd read system logs like /var/log/syslog and user-specific logs like the .xsession-errors file located in the user's home directory. On MacOs , on top of the system logs, you'd go through...

Authentication Authorization Accounting(week 3)

Identification is the idea of describing an entity uniquely. Biometric authentication is the process of using unique physiological characteristics of an individual to identify them. C.R.L(Certificate revocation list) :This is a signed list published by the CA which defines certificates that have been explicitly revoked. Lightweight Directory Access Protocol(LDAP): LDAP is an open industry-standard protocol for accessing and maintaining directory services. Authentication is related to verifying the identity a user, authorization pertains to describing what the user account has access to or doesn't have access to. An access control list or ACL , is a way of defining permissions or authorizations for objects.  RADIUS or Remote Authentication Dial-In User Service , is a protocol that provides AAA services for users on a network.It's a very common protocol used to manage access to internal networks, WiFi networks, email services and VPN services. when a client wants to access a r...