Chapter 4. Physical and Virtual Memory
45
of cache is to function as a very fast copy of the contents of selected portions of RAM, any time
a piece of data changes its value, that new value must be written to both cache memory and RAM.
Otherwise, the data in cache and the data in RAM will no longer match.
The two approaches differ in how this is done. One approach, known as write through cache, imme 
diately writes the modified data to RAM. Write back cache, however, delays the writing of modified
data back to RAM. The reason for doing this is to reduce the number of times a frequently modified
piece of data will be written back to RAM.
Write through cache is a bit simpler to implement; for this reason it is most common. Write back
cache is a bit trickier to implement, in addition to storing the actual data, it is necessary to maintain
some sort of flag that flags the cached data as clean (the data in cache is the same as the data in RAM),
or dirty (the data in cache has been modified, meaning that the data in RAM is no longer current).
Because of this, it is also necessary to implement a way of periodically flushing dirty cache entries
back to RAM.
4.2.2.1. Cache Levels
Cache subsystems in present day computer designs may be multi level; that is, there might be more
than one set of cache between the CPU and main memory. The cache levels are often numbered, with
lower numbers being closer to the CPU. Many systems have two cache levels:
L1 cache is often located directly on the CPU chip itself and runs at the same speed as the CPU
L2 cache is often part of the CPU module, runs at CPU speeds (or nearly so), and is usually a bit
larger and slower than L1 cache
Some systems (normally high performance servers) also have L3 cache, which is usually part of the
system motherboard. As might be expected, L3 cache would be larger (and most likely slower) than
L2 cache.
In either case, the goal of all cache subsystems   whether single  or multi level   is to reduce the
average access time to the RAM.
4.2.3. Main Memory   RAM
RAM makes up the bulk of electronic storage on present day computers. It is used as storage for both
data and programs while those data and programs are in use. The speed of RAM in most systems
today lies between the speeds of cache memory and that of hard drives, and is much closer to the
former than the latter.
The basic operation of RAM is actually quite straightforward. At the lowest level, there are the RAM
chips   integrated circuits that do the actual "remembering." These chips have four types of connec 
tions to the outside world:
Power connections (to operate the circuitry within the chip)
Data connections (to enable the transfer of data into or out of the chip)
Read/Write connections (to control whether data is to be stored into or retrieved from the chip)
Address connections (to determine where in the chip the data should be read/written)
Here are the steps required to store data in RAM:
1. The data to be stored is presented to the data connections.
2. The address at which the data is to be stored is presented to the address connections.
3. The read/write connection to set to write mode.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

website hosting provider

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved