Cache Memory

Posted: November 17, 2008 by Narendra Shah in Reserch And Development
Tags: ,

Every one which is from IT industry is some how knows about Cache Memory. Then also let me introduce about it with little bit different way as explained in HOWSTUFFWORKS, it is some how related librarirain meance non technical.

E.g In any library(not online), there is person with post Librarian(i.e CPU, Harddisk etc.).His job is to issue and take back books(data digital data). What he will do when ever any user comes, he goes to libarary store room take the book required by user and issue him. When some other user comes for submitting book, he will put that book back to library. Think about the time required by libararian to put and take book from Library.

As such he knows that every one is generally coming for requirement of very known book, why he will go to store and come back. Rather when any use submit book then he will put that in the Rack(CACHE) itself. If any one comes to take book he will return that book from the Rack itself. This is very popular solution which generally many libararian are following.

Now coming to our computer world, with coming of Dual core and Core 2 Duo processor, they do have cache which will store frequently used operation in the cache. and it will make that processor being faster than any other CPU which do have higher clock rate. and Performance hikes. Now intel is thinking only for cache to increase speed of his CPU. So he is now ahead of AMD. AMD do have processor which are much more faster in clock speed then also, Intel chip will give more performance because he have cache. And now intel wins.

When you think about writing cache for your application then you will get the performance difference of your own application.

Let me show you how? In many application we do have databases, why dont we cache the connection in connection pool. Why dont we design a cache architecture which will store frequently used database operation will be on database as well as on cache also. When you write in frequently used table then write it in cache and database both. So when ever any operation requested by your application from table it will return from Cache itself and not from table. So decrease I/O read from Harddisk.

Same is true for file operation also.

There are some thing before incorporating cache with your application like if you have good RAM then your application goes faster. But if it is not then it is not good to use it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s