Saturday, August 25, 2012

Cache can also be integrated directly on the device

So the browser (Internet Explorer, Netscape, Opera, etc.) using a hard disk to store HTML pages, put them into a special folder on your hard disk. The first time you request an HTML page, the browser picks it up and keep a copy on your hard disk. When next you request a page, the browser checks if the file date on the Internet more recent than that stored in the cache. If the same date, rather than downloading from the Internet, using a browser that are stored on your hard disk. In this case, the memory is smaller but faster hard disk and a large but slow is the Internet.

Cache can also be integrated directly on the device. Modern hard disks come equipped with a cache of about 2-8 megabytes. The computer does not directly use this memory - the hard disk controller does.

For a computer, a memory chip is a hard disk itself. When the computer requests data from the hard disk, hard disk controller in a memory check before moving the mechanical hard disk (which is very slow compared to memory).

If he finds the requested data in the cache computer, it will provide data stored in the cache without truly accessing the data on the hard disk itself, saving a lot of time. It's an experiment you can do.

Your computer's floppy drive cache with main memory, and you can see it happening. Access a large file from your floppy - for example, open a 300-kilobyte text file in a text editor. The first time, you will see the floppy light is on, and you will wait. Floppy disks are very slow, so it will take about 20 seconds to open the file.

Now, close the editor and reopen the same file. The second time (do not wait 20 seconds or do a lot of hard disk access between the two) you will not see the lights on, and you will not wait. Check the operating system into its memory cache for the floppy disk and try the search.

So rather than wait 20 seconds, the data found in the memory subsystem is much faster than the first time you try (one access to the floppy disk takes 120 milliseconds, while access to main memory takes about 60 nanoseconds - it's much faster). You can perform the same experiment on a hard disk, but more pronounced in the floppy drive because it is very slow.

Cache technology One question that often arises, "Why not make all the computer's memory runs at the same speed as the L1 cache, so it does not need caching?" It could be, but at would be very expensive. The idea behind caching is to use a small amount of expensive memory to speed up the cheaper memory is large and slow. In making the computer, the goal is to enable the microprocessor running at full speed with the least possible cost.

500-MHz chip has 500 million cycles in one second (one cycle every two nanoseconds). Without the L1

Top Ro Ro Ro

0 comments:

Post a Comment