Monday, May 29, 2006

Meet pagefile.sys

My first acquaintance with the infamous pagefile.sys was when windows rudely announced that I had no more free space on my C:\ drive. I was working on Photoshop and had just finished processing a new wallpaper for the college. A quick scan with showman told me that my pagefile.sys was around 1.5GB
My first reaction was to delete that space hogger from the face of my hard disk. But wait, I had a bad feeling about this. My geek instincts told me that I had to check on this first.

What is pagefile.sys
Do you what is RAM?
Do you know what is a hard disk?
Do you know what is a processor?
If you answered "No!!" to all the questions mentioned above, you may stop reading this page NOW. May the gods of computers strike ye down with lightning from a shorted SMPS.
If you answered "Yes!!" to any one of the questions, please treat yourselves to a cup of coffee and read on.

The simplest explanation to the purpose of pagefile.sys is that it acts like a swap file. Pagefile.sys is how Windows handles virtual memory using demand paging. Okay now you want to know what is demand paging and virtual memory...

Virtual Memory and Demand Paging
Virtual memory is an attempt to fool the computer to think that it has more RAM.
The Memory Management Unit(MMU) on the CPU has the ability to substitute space on the hard disk for actual RAM. This space is called swap space. And this mechanism is called demand paging.The swap space is contained in a file called swap file.
Hence swap files allow the operating system to simulate extra memory.

Physical memory + swap file = virtual memory

Why extra memory you greedy operating system?
I will share a profound truth, that dawned on me when in deep contemplation with lomax.
"Memory is like clean underwear. You never get to have enough of it."

Suppose you don't have enough RAM on your machine, you can create a large swap file and hence get a larger virtual memory. The advantage here is that you can load larger programs into your memory, and run more programs concurrently.

The downside is that if you have serious memory hogging programs, they will pull down the performance due to frequent swapping of files between RAM and swap disk.

Can I configure pagefile.sys settings
Sure you can!!
Please read: Tweaking and optimizing pagefile.sys

Other Useful Links
Page File Information
Optimising PageFile Performance
Purpose of PageFiles
Another Blog that contains useful information

Sunday, May 28, 2006

Hello World

/**
* I am starting this blog as a part of my venturing into the programming world.
* I will share my code and terrible...umm terrific insight on various other codes
* that I come across.
*/

#include
void main()
{
helloworld.programming();
}