Wednesday, 15 October 2014

Server GC in .Net Framework 4.5

.NET Garbage Collection

Once memory allocation is done, it is required to deal locate the memory once that object goes out of scope or no longer been used in future. It is highly recommended to do memory management to reduce the cases of memory leak and it is automatically controlled by garbage collector in .Net framework.

Manual Memory Management

When you use any unmanaged language or frameworks, you are required to allocate and deallocate the memory of object created manually. In manual process of memory management you are required to write a command to allocate memory from environment and again you have to intimate environment to release the memory of object which are no longer been used in future.

Manual memory management is quite foggy and due to its drawback, .Net introduce automatic memory management algorithm which is known as garbage collection.

Automatic Memory Management (Garbage Collection)

The key aspect of .Net frameworks is developer does not need to allocate or deallocate memory manually and let the developer concentrate on actual coding to make good outcome of software instead of bothering and thinking about the memory allocation. And in most cases developer doesn't need to think much about memory management aspect.

When you create the object, framework allocates memory automatically and when object no longer used, the common language runtime (CLR) deals with the deallocation of the memory that they used.

The garbage collection process is complex with many optimizations. And still microsoft is optimizing it more and more with new release of .Net frameworks.

In recent release of .Net framework 4.5, GC comes with more improvement and addition of Server GC.

GC in Framework 4.0

In .NET 4.0, when the GC runs for cleanup, all the application threads are suspended. The different application threads are running for different application and GC is running on separate thread. Each logical processor will have their separate thread. Each application create their managed objects and as GC run on separate thread, that also create their managed objects. At some point of time the background process for garbage collection will run and release the objects memory which are no longer been used in future but as garbage collector itself create their own managed object it has to manage those objects as well which slow down the server/application for the moment.

To overcome the this problem, server GC was introduced.

Server GC in Framework 4.5

Server GC is one more thread created which runs in the background which manage the object created by main GC and it reduce the load of main GC thread. thus increasing application throughput.

How to enable server GC

To enable server GC, we need to use the gcServer XML tag and enable it to true.

<configuration>
   <runtime>
      <gcServer enabled="true"/>
   </runtime>
</configuration>

Read more here : Async and Await in .Net Framework 4.5

Thursday, 3 July 2014

Top Controls To Make ASP.Net Developers Work Easy

There are many functions and tools available which made developers work very easy and provide great functionality to the application. Following are the top controls which are best to work with.
  • Ajax:  This is very useful one as most of the third party controls are supported by Ajax. RadAjax is the best one for it.
  • Menu: This is very important and useful function which you ever need while building the application with ASP .Net. You can do the customization in its design, color etc as per your creative ability. There are multiple options for menu creation like ComponentOneMenu Control, DevExpress ASPxMenu and RadMenu for ASP.net Ajax.
  • Sitemap: This build in function will help to make website search engine friendly. Sitemap is really very very useful from users perspective if there are so many pages in the website. RadSitemap for Ajax is the nice option to use
  • Tab Strip: This function is really veryuseful for better UI experiance. Developers can use this tabs to display various things. RadTabstripe is good one
  • Graph & Chart: This is really very nice one as developers can prepare graphs and charts in the applications. This function package can help you to create animated charts too.  Dundas chart for asp .net is very popular one amongst developers
  • Scheduler: This is another great tool which provides the better performance and easy developing enviornment to the developers.
  • Editor: This is very very important one. This function can let you perform various operations such like deployment of various field set by just drag and drop.  It also has in built spell checker and customized tool bar.
  • Reporting: This is really very interesting function for those who don't like to prepare reports. Here with this function developer can directly generate the reports on various things.
  • Input: This function has mny input options with it like list box, combo box, date and color pickers etc.
There are many other third party tools are available which can make application development work very smooth and easy one for the developers. Also this tools can provide great richness to the application which can be very very useful for end users.

Get more information about Basics Of ADO.NET Components