Sunday, November 16, 2008

Fundas of Contiguous Memory Allocation - Part I

Through Contiguous Memory Allocation, the memory manager strictly allocates contiguous memory locations to an object loaded in the memory. The Contiguous Memory Allocation can be done in two ways, static and dynamic.



In the Static Memory Allocation, the memory is divided into equal sized partitions and objects are loaded into these partitions as the processes ask for them. With this type of memory allocation, we see a fragmentation that is known as internal fragmentation that occurs when a small object is loaded into a partition of a larger size. The space that is not occupied by the object cannot be allocated to another object and hence is wasted.

In case of Dynamic Memory Allocation, the internal fragmentation is eliminated by making each partition only as large as necessary for a particular object. When an object is removed from memory, the space occupied by it is returned to the pool of available memory spaces. However, in this case, a fragmentation known as External Fragmentation is observed because over the time, dynamic partitioning 0f memory has a tendency to fragment memory into interspersed areas of allocated and unused memory. As these areas are not contiguous, allocation may fail to find a free region to honor a request, even when the combined size of the free memory exceeds the need of the object by a wide margin.

Another type of fragmentation that can be seen in case of contiguous memoy allocation is the table fragmentation. This is attributed to the space occupied by the data structures needed for operation of the memory manager.

Thursday, November 13, 2008

Windows 7

1. Why 7 ?
>> Its 7th OS from Microsoft. Seventh release of Windows.

Other 6 Windows Operating Systems:

Windows XP
Windows Vista
Windows 2000
Windows 98
Windows ME
Windows 95

Main Features:

Windows 7 includes a number of new features, such as advancements in touch, speech, and handwriting recognition, support for virtual hard disks, improved performance on multi-core processors, improved boot performance, and kernel improvements.

- Improved Wordpad
- Improved Calculator Functionalities
- New look to Media Centre

Many new items have been added to the Control Panel including: Accelerators, ClearType Text Tuner, Display Color Calibration Wizard, Gadgets, Infrared, Recovery, Troubleshooting, Workspaces Center, Location and Other Sensors, Credential Manager, Biometric Devices, System Icons, Windows Solution Center, and Display.

-- Some applications that have been included with prior releases of Microsoft Windows, most notably Windows Mail, Windows Movie Maker and Windows Photo Gallery, are no longer included with the operating system; they are instead offered separately as part of the Windows Live Essentials suite. --

For more details CLICK HERE

Wednesday, November 12, 2008

Result Codes in Fiddler

In Fiddler UI you can see two sections, on the right side and other on Left. Left section list all web sessions. In Web Sessions section you can see different Results for different web calls.

The following Result codes quickly discuss each HTTP status that you can get back, what it means, and what to do about it.

301 — Moved Permanently

This HTTP status means that a redirect was used – and that the redirect told the browser that the redirect would remain in effect indefinitely. The URL that the web browser asked for has permanently moved to a new location. This may mean that your application is referring to a directory on the web site without a final slash. So if the reference is http://ripple4photography.blogspot.com/search/label/Light the reference should be http://ripple4photography.blogspot.com/search/label/Light/ because blog isn't a file it's a directory.

302 — Object Moved

This type of status is a temporary redirect. This is the kind of redirect that most developers are familiar with. It tells the web browser that the object has temporarily moved to a new location. These are normal for applications that post back to the same page, validate the input, perform the operation, and then redirect the user to another page. These generally don't represent a problem unless there are a lot of them.

304 — Not Modified

This type of status indicates that the web browser asked the server if the image had been modified since the browser had cached it. The browser sent a request for the file but indicated in the request that it had a cached copy and that the web server shouldn't bother sending it back unless it changed. This typically indicates that the cache control headers aren't present in the responses the browser is receiving. As a result it caches the response but has to check with the web server to see if its cache is still valid. This can be a performance problem. Since not a lot of data is transmitted it doesn't have a huge impact on overall bandwidth, however, because there can be many of these requests the latency of each call to check whether an image has changed or not can add up to a significant wait time for the user. By setting caching headers in the response that the browser receives these 304 statuses can all be eliminated.

400 — Bad Request

This status code means that the web server didn't understand the request from the client. Although this occurs rarely it can be a problem if it's occurring frequently. This typically points to components integrated into the web server, such as ISAPI filters, which are mangling the request but can sometimes point to poorly encoded data in the request.

404 — Not Found

This status message is the most infamous status on the Internet. It means that the web server couldn't find the content that was requested. If this is the main page that the user has requested this will be obvious as they get a 404 page. However, if it's for a JavaScript file, a CSS file, or other supporting files for the page, the user may not know anything is wrong. The best solution here is to track down the references and update them.

500 — Server Error

This status message is a bit more ominous than the others here. It's more ominous because it means that the server wasn't able to complete the processing of the request. This can indicate a greater server problem or at the very least instability that should be addressed. As with other errors it may be hidden in an embedded object and can be easily missed.

502 — Connection Issue

This status message indicates that a connection message couldn't be made to the server. This could mean that the name wasn't translated or that there are problems in the underlying transport of packets to the server. Either case indicates a broader networking issue. You'll need to make sure that you have thoroughly tested the underlying network before continuing to debug the issue.

200 - Successful web requests :-)

What is Fiddler?

For last few months I have using Fiddler for my testing. Actually I used to test some hybrid application where a desktop application interact with multiple online servers for different purposes. So Fiddler helped me to track different http calls between desktop and online servers.

Fiddler is a HTTP Debugging Proxy which logs all HTTP traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP Traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more.

Fiddler is the electronic equivalent of an X-Ray that can get into the traffic going between your web application and the web server to make sure that everything is OK. Fiddler can tell you what was wrong in a specific interaction and can show you at a glance what problems there are with the overall conversation. It's an invaluable tool for anyone who develops web applications — no matter whether that development is in .NET, Java, Cold Fusion, or some other language.