<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Gdeepak1984's Blog</title>
	<atom:link href="http://gdeepak1984.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gdeepak1984.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sat, 30 Oct 2010 12:47:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gdeepak1984.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Gdeepak1984's Blog</title>
		<link>http://gdeepak1984.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gdeepak1984.wordpress.com/osd.xml" title="Gdeepak1984&#039;s Blog" />
	<atom:link rel='hub' href='http://gdeepak1984.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Students Account by Punjab National Bank</title>
		<link>http://gdeepak1984.wordpress.com/2010/10/30/students-account-by-punjab-national-bank/</link>
		<comments>http://gdeepak1984.wordpress.com/2010/10/30/students-account-by-punjab-national-bank/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 12:47:43 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[Newspaper]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/?p=106</guid>
		<description><![CDATA[Students Account by Punjab National Bank. Recently I came to know about a very nice initiative started by DelhiGoverment. Under this scheme students are given Accounts with Punjab National Bank. Here students are given the facility of withdrawing money directly from ATMs , here no third party distribution is existing , directly the accounts are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=106&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Students Account by Punjab National Bank. </p>
<p>Recently I came to know about a very nice initiative started by DelhiGoverment. Under this scheme students are given Accounts with Punjab National Bank. Here students are given the facility of withdrawing money directly from ATMs , here no third party distribution is existing , directly the accounts are created under the name of the student.<br />
Say a small amount (Rs500,Rs700 or Rs1500) are given to students at various stages of thier studies.</p>
<p> As I got to meet the students of Sarvodaya Vidyalaya, Sharda Niketan, Delhi-34 and they seems to be happy happy about this small contribution given by Delhi Goverment.<br />
 I also discovered few students are going to school just to get these benefits. They use this money to sponsor thier travel and other study related expenses.<br />
This seems to be too little but I strongly believe that &#8220;A little progress everyday leads up to big results&#8221;.<br />
The school which I mentioned above happens to be the place where I have spend 10 yrs of my life as I have done my primary Eductions from here.<br />
I heared about other initiative like &#8220;LADLLI&#8221; where Girl child (student) gets a fixed deposit of Rs 100000 and they wil be given this amount once they get Adult(18yrs) for thier further studies.<br />
I think Delhi Goverment is doing a good job for education.<br />
Thanks to modern banking system and Public Distribution Systems Idea.</p>
<p>I hope other other Goverment Funds will find the some good utilization like this.Instead of filling the pockets of crrupt politicians.</p>
<p>After I heared a lot about scam @ Common Wealth Games in Delhi<br />
this FACT really relaxed my soul a lot, I was asked by lots of people outside Delhi about the rising graph of corruption in delhi.<br />
I think this is enough for time being <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Jai Ho!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=106&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2010/10/30/students-account-by-punjab-national-bank/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>NCFM Certificate- Equity Derivatives</title>
		<link>http://gdeepak1984.wordpress.com/2010/05/29/ncfm-certificate-equity-derivatives/</link>
		<comments>http://gdeepak1984.wordpress.com/2010/05/29/ncfm-certificate-equity-derivatives/#comments</comments>
		<pubDate>Sat, 29 May 2010 13:36:35 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[Call option]]></category>
		<category><![CDATA[Certificate]]></category>
		<category><![CDATA[Derivatives]]></category>
		<category><![CDATA[Equity]]></category>
		<category><![CDATA[Equity Derivatives]]></category>
		<category><![CDATA[Forwards]]></category>
		<category><![CDATA[Futures]]></category>
		<category><![CDATA[NCFM]]></category>
		<category><![CDATA[Options]]></category>
		<category><![CDATA[PUT Option]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/?p=101</guid>
		<description><![CDATA[Today was my first NCFM (NSE Certificates for Financial Markets) certificate. I gave Equity Derivatives – A Beginners Module and I was able score 92%. It was a quite simple one I guess, for exam I had to go to Reliance Web World, Malleshwaram. Earlier I was just wondering that only very few people will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=101&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today was my first NCFM (NSE Certificates for Financial Markets) certificate.<br />
I gave Equity Derivatives – A Beginners Module and I was able score 92%.<br />
It was a quite simple one I guess, for exam I had to go to Reliance Web World, Malleshwaram.<br />
Earlier I was just wondering that only very few people will be there but to my surprise it was full and so many of them were there.<br />
Few things to keep in mind:-<br />
1. You can take scientific calculator with you.<br />
2. Take PAN CARD or any other photo id with you.<br />
3. Take a photograph in case you have not uploaded on nse/ncfm website.<br />
Let me talk about the exam as most of the questions were from the study material provided on the website and only few were from the course content.<br />
Numerical were quite simple and for them you can write down few calculations on the rough sheet, few exponential values were used again and again.<br />
I am planning few more in future.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=101&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2010/05/29/ncfm-certificate-equity-derivatives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>CALL options in Derivatives</title>
		<link>http://gdeepak1984.wordpress.com/2010/05/26/call-options-in-derivatives/</link>
		<comments>http://gdeepak1984.wordpress.com/2010/05/26/call-options-in-derivatives/#comments</comments>
		<pubDate>Wed, 26 May 2010 09:29:26 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[Investment Ideas]]></category>
		<category><![CDATA[Derivatives]]></category>
		<category><![CDATA[Equity Derivatives]]></category>
		<category><![CDATA[PUT Option]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/?p=99</guid>
		<description><![CDATA[From last few days I have being studying about futures and options. Today I was having sometime to  apply my book knowledge to practice. I have studied that you can buy/sell CALL or PUT options. I was studying that you can invest a LITTLE and can gain a lot from F&#38;O. Now today discovered what [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=99&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>From last few days I have being studying about futures and options.</p>
<p>Today I was having sometime to  apply my book knowledge to practice.</p>
<p>I have studied that you can buy/sell CALL or PUT options.</p>
<p>I was studying that you can invest a LITTLE and can gain a lot from F&amp;O.</p>
<p>Now today discovered what is the value of that LITTLE.</p>
<p>Say today I wanted to buy CALL option for JUN’10 series.</p>
<p>SUZLON-60@3.5 (lot size 3000), meaning if I want to buy a call option for suzlon june series</p>
<p>I have to pay a LITTLE of 3.5 *3000=10500, currently SUZLON in trading @ 59.50 in cash market.</p>
<p>It means I have to pay a cost of 6% (LITTLE) of the current stock price.</p>
<p>It’s a quite expensive deal.</p>
<p>As this Rs 10500 is something which will never come back to you.</p>
<p>But, in case SUZLON crosses 60 then I can make some money say if it will go to 65 I will make 5*3000 =Rs15000.</p>
<p>Profit of Rs 4500, only in case if rises by almost 10% not bad.</p>
<p>So try your luck but be very careful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=99&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2010/05/26/call-options-in-derivatives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>Car shifting/Transport</title>
		<link>http://gdeepak1984.wordpress.com/2010/04/02/car-shiftingtransport/</link>
		<comments>http://gdeepak1984.wordpress.com/2010/04/02/car-shiftingtransport/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 07:30:44 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[Bakwas]]></category>
		<category><![CDATA[Car]]></category>
		<category><![CDATA[packers]]></category>
		<category><![CDATA[santro]]></category>
		<category><![CDATA[shifting]]></category>
		<category><![CDATA[Transport]]></category>
		<category><![CDATA[wheels]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/2010/04/02/car-shiftingtransport/</guid>
		<description><![CDATA[Last week I got my SANTRO CAR shifted/transported from Delhi to Bangalore. I have checked fee Packers in Delhi but finally we decided to go with some known name, we found Aggarwal Packers &#38; Movers. The service offered by them was pretty decent enough they took Rs 12000 other packers which we enquired with were [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=97&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last week I got my SANTRO CAR shifted/transported from Delhi to Bangalore.<br />
I have checked fee Packers in Delhi but finally we decided to go with some known name, we found<br />
Aggarwal Packers &amp; Movers.</p>
<p>The service offered by them was pretty decent enough they took Rs 12000 other packers which we<br />
enquired with were asking for Rs10000 &#8211; 10500 but went with brand and reliability , always<br />
go to the office of the Packers and get full details.</p>
<p>They came to my house to pick the CAR, accepted Post Dated cheque of Rs 12000 and asked us to fuel<br />
our Car with 10 ltrs don&#8217;t give money to them and ask them to fuel by themself.</p>
<p>they will take the original PUC copy and xerox of the RC and other docs like insurance.</p>
<p>It took almost 8 Days for my car to reach Bangalore.</p>
<p>While giving Car for transport do always remember to Get it instpected very well in front of the<br />
Packer.</p>
<p>Keep in find few things</p>
<p>- Battery No.<br />
- Tyres No. and thier conditions<br />
- Screatches<br />
- Any other registration of anything is there or not.<br />
-Meter readings</p>
<p>These things help when you recieve your car.</p>
<p>They will be telling you that your Car doesn&#8217;t have enough fuel &#8230;just act smartly and try not</p>
<p>to pay any extra amount as you would have already paid for 10 ltrs.</p>
<p>Now as i have got my car in bangalore so i have to face so many new issues here</p>
<p>- Traffic (ITPL parking @ 1200 i preffered to go with Open parking @ 600)<br />
- Parking<br />
- Auto Rikshaws<br />
- High petrol prices<br />
- Registration related issues with Police<br />
- I don&#8217;t know what all are the documents required<br />
- Is there any NOC is required.<br />
- Do i have to pay any Road Tax or somthing<br />
_ Extra expenses..<br />
&#8211; It fill be a touch life i guess&#8230;let&#8217;s see..pray for me.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=97&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2010/04/02/car-shiftingtransport/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>.net Remoting</title>
		<link>http://gdeepak1984.wordpress.com/2009/07/08/net-remoting/</link>
		<comments>http://gdeepak1984.wordpress.com/2009/07/08/net-remoting/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 14:54:16 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[Asp.net]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/?p=94</guid>
		<description><![CDATA[http://www.c-sharpcorner.com/uploadfile/rahul4_saxena/remoting04252007233559pm/remoting.aspx?login=true&#38;user=gdeepak1984<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=94&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I found this article a bit easy and easily understandable and the one which you can perform and get a feel of learning Remoting.</p>
<p>Remoting is the process through which we can access any remote object from one application domain to another application domain. </p>
<p>For creating remote object the class object must be inherited by MarshalByRefObject class. </p>
<p>Application domain  is the runtime environment of application, For MicrosoftWord, domain is MS office, For .NET programme, .NET runtime environment. </p>
<p>Terms Used in Remoting </p>
<p>Proxy: To avoid conjunction in networking. Main work is task Distributing.There are two type of proxy.</p>
<p>Transparent proxy (There is no physical existence , Created by IIS server)<br />
Real Proxy  (Physical Existence)</p>
<p>Channel: Channel provides the medium for transfer data from one location to another location. There  are two types of channel. </p>
<p>TCP(work with Predefined root Connection oriented)<br />
HTTP (No need predefined root)<br />
Formatters: Change the data in an appropriate format that it can traverse through channels.</p>
<p>There are two types of formatters<br />
 Binary<br />
SOAP(Simple Object Access Protocol)<br />
Sink:  Sink is used for security point of view. Before sending the data, the Data will be encrypted. Some additional bit will be added with the data to secure the data. </p>
<p>There are two types of sink<br />
Envoy sink<br />
Server Context Sink<br />
Object Mode On Server: Two Types of Object Mode . </p>
<p>SingleCall<br />
Singleton<br />
For creating Remoting we have to create 3 applications: </p>
<p>class Library (Of which Remote Object will be created)<br />
Server Application (Console Application)<br />
Client Application (Window Application)<br />
RemoteClass </p>
<p>using System; </p>
<p>using System.Collections.Generic; </p>
<p>using System.Text; </p>
<p>namespace remoteclass </p>
<p>{ </p>
<p>    public class xx:MarshalByRefObject </p>
<p>    { </p>
<p>        public int sum(int a, int b) </p>
<p>        { </p>
<p>             return a + b; </p>
<p>        } </p>
<p>    } </p>
<p>}</p>
<p>Remote Server </p>
<p>using System; </p>
<p>using System.Collections.Generic; </p>
<p>using System.Text; </p>
<p>using System.Runtime.Remoting; </p>
<p>using System.Runtime.Remoting.Channels; </p>
<p>using System.Runtime.Remoting.Channels.Tcp; </p>
<p>namespace remoteserver </p>
<p>{ </p>
<p>    class Program </p>
<p>    { </p>
<p>        static void Main(string[] args) </p>
<p>        { </p>
<p>            TcpChannel ch=new TcpChannel(8085); </p>
<p>            ChannelServices.RegisterChannel(ch); </p>
<p>            RemotingConfiguration.RegisterWellKnownServiceType(typeof </p>
<p>                           (remoteclass.xx),&#8221;rahul&#8221;,WellKnownObjectMode.Singleton); </p>
<p>            Console.Write(&#8220;Sever is  Ready&#8230;&#8230;..&#8221;); </p>
<p>            Console.Read();  </p>
<p>        } </p>
<p>    } </p>
<p>}  </p>
<p>When user run this Remote Server application.  </p>
<p>Figure 1:  Server Application. </p>
<p>Remote Client </p>
<p>using System; </p>
<p>using System.Collections.Generic; </p>
<p>using System.ComponentModel; </p>
<p>using System.Data; </p>
<p>using System.Drawing; </p>
<p>using System.Text; </p>
<p>using System.Windows.Forms; </p>
<p>using System.Runtime.Remoting; </p>
<p>using System.Runtime.Remoting.Channels; </p>
<p>using System.Runtime.Remoting.Channels.Tcp; </p>
<p>namespace remoteclient </p>
<p>{ </p>
<p>    public partial class Form1 : Form </p>
<p>    { </p>
<p>        //TcpChannel ch = new TcpChannel(); </p>
<p>        remoteclass.xx obj = new remoteclass.xx(); </p>
<p>       public Form1() </p>
<p>       { </p>
<p>           InitializeComponent(); </p>
<p>       } </p>
<p>        private void button1_Click(object sender, System.EventArgs e) </p>
<p>        { </p>
<p>            //ChannelServices.RegisterChannel(ch); </p>
<p>            obj = (remoteclass.xx)Activator.GetObject(typeof(remoteclass.xx), </p>
<p>                           &#8220;tcp://localhost:8085/rahul&#8221;); </p>
<p>            int x = Int32.Parse(textBox1.Text); </p>
<p>            int y = Int32.Parse(textBox2.Text); </p>
<p>            textBox3.Text = (obj.sum(x, y)).ToString(); </p>
<p>        }        </p>
<p>    } </p>
<p>}</p>
<p>When user run the application. </p>
<p>Figure 2: Client Application. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=94&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2009/07/08/net-remoting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>Word counts in a Text file</title>
		<link>http://gdeepak1984.wordpress.com/2009/07/08/word-counts-in-a-text-file/</link>
		<comments>http://gdeepak1984.wordpress.com/2009/07/08/word-counts-in-a-text-file/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 08:29:46 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[counts]]></category>
		<category><![CDATA[Text file]]></category>
		<category><![CDATA[Word]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/2009/07/08/word-counts-in-a-text-file/</guid>
		<description><![CDATA[namespace WordsCount { class Program { static void Main(string[] args) { WordCount obj = new WordCount(); // read the text file StreamReader reader = new StreamReader(@&#8221;D:\Test.txt&#8221;); // pass the file as the string of input string readthisline = reader.ReadToEnd(); // Console.WriteLine(obj.CountWords(readthisline)); obj.CountWords(readthisline); Console.ReadLine(); } } class WordCount { public string CountWords(string input) { // ignore [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=92&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>namespace WordsCount<br />
{<br />
    class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {<br />
            WordCount obj = new WordCount();<br />
            // read the text file<br />
            StreamReader reader = new StreamReader(@&#8221;D:\Test.txt&#8221;);</p>
<p>            // pass the file as the string of input<br />
            string readthisline = reader.ReadToEnd();</p>
<p>           // Console.WriteLine(obj.CountWords(readthisline));<br />
            obj.CountWords(readthisline);<br />
            Console.ReadLine();<br />
        }<br />
    }</p>
<p>    class WordCount<br />
    {<br />
        public string CountWords(string input)<br />
        {<br />
            // ignore these words, remove these things from the final input string.<br />
            char[] delims = new char[] { &#8216; &#8216;, &#8216;.&#8217;, &#8216;,&#8217;, &#8216;;&#8217;,'&#8221;&#8216;,&#8217;?',&#8217;(&#8216;,&#8217;)',&#8217;:'};</p>
<p>            // prepare the words from the string<br />
            string[] wordlist = input.Split(delims, StringSplitOptions.RemoveEmptyEntries);</p>
<p>            // this is the final word list to be counted after removing the extra things.<br />
            SortedList words = new SortedList();</p>
<p>            //Dictionary words = new Dictionary(wordlist.Length); </p>
<p>            // count the repetitions of the words<br />
            foreach (string item in wordlist)<br />
            {<br />
                // check for upper and lower cases as well<br />
                if (!words.ContainsKey(item.ToLower()))<br />
                    // find the word and add to the list.<br />
                    words.Add(item.ToLower(), 1);<br />
                else<br />
                    // increment the word count.<br />
                    words[item.ToLower()]++;<br />
            }<br />
            StringBuilder sb = new StringBuilder();<br />
            foreach (KeyValuePair kvp in words)<br />
            {<br />
                sb.Append(kvp.Key + &#8220;: &#8221; + kvp.Value + &#8220;\r\n&#8221;);<br />
                Console.WriteLine(&#8220;The word is {0} and repitions {1}&#8221;, kvp.Key,kvp.Value);<br />
            }<br />
            //foreach (string item in words.Keys)<br />
            // sb.Append(item + &#8220;: &#8221; + words[item] + &#8220;\r\n&#8221;);<br />
            return sb.ToString();<br />
        }<br />
    }</p>
<p>}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=92&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2009/07/08/word-counts-in-a-text-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>Interview @ Goldman Sachs , Bangalore</title>
		<link>http://gdeepak1984.wordpress.com/2009/07/06/interview-goldman-sachs-bangalore/</link>
		<comments>http://gdeepak1984.wordpress.com/2009/07/06/interview-goldman-sachs-bangalore/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 15:16:25 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[Interviews]]></category>
		<category><![CDATA[Goldman Sachs]]></category>
		<category><![CDATA[interview]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/2009/07/06/interview-goldman-sachs-bangalore/</guid>
		<description><![CDATA[Written Test(.Net) I dont remember the exact questions but i can give u brief idea what were the questions like. I have given the test as the .Net guy. As they are using JAVA for the rest of the project, but they are using .Net for Front end (Web , windows application). Few concepts or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=90&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Written Test(.Net)<br />
I dont remember the exact questions but i can give u brief idea what were the questions like.<br />
I have given the test as the .Net guy.<br />
As they are using JAVA for the rest of the project, but they are using .Net for Front end (Web , windows application).<br />
Few concepts or questions or toppics<br />
-As the reuirement was for UI, front end so all the questions were revolving around that.<br />
-Dataset<br />
-DataAdaptor<br />
-Fill()<br />
-Outproc(SQL Server , state server)<br />
-DebugListner<br />
-Trace<br />
-Application run mode (define- Debug/Trace)<br />
-Gridview (ButtonField,CommandField)<br />
-Viewstate<br />
-Property to get a column from Dataset.<br />
-Prepare well on Threading<br />
-Prepare well on Delegates<br />
-Design Patterns<br />
-BinaryTextWriter<br />
-How to get the root node of a dataset.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=90&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2009/07/06/interview-goldman-sachs-bangalore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>Dispose</title>
		<link>http://gdeepak1984.wordpress.com/2009/07/03/dispose/</link>
		<comments>http://gdeepak1984.wordpress.com/2009/07/03/dispose/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 09:36:38 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/?p=87</guid>
		<description><![CDATA[Dispose is the method, which we call usually when we want the object to be garbage collected. If u r calling Dispose() on inbuilt classes like Form, It&#8217;ll call a method Finalize() method, which will usually used to cleanup any resources used with in the form. With in this Finalize method, we call the garbage [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=87&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dispose is the method, which we call usually when we want the object to be garbage collected. If u r calling Dispose() on inbuilt classes like Form, It&#8217;ll call a method Finalize() method, which will usually used to cleanup any resources used with in the form. With in this Finalize method, we call the garbage collector to recycle the memory. So, when u r using dispose method, it is used to mark the object to Garbage Collectable. Calling the Dispose dose&#8217;t means, that object will b garbage collected immidiately. GC will monitor the Managed memory for objects Marked 4 garbage collectable. The recycling of memory depends on when the GC will pay the visit.<br />
Purely the Dispose method is not used for reseting the values in the object. It is used to mark the Object to b collected by the GC </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=87&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2009/07/03/dispose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>Serialization</title>
		<link>http://gdeepak1984.wordpress.com/2009/07/03/serialization/</link>
		<comments>http://gdeepak1984.wordpress.com/2009/07/03/serialization/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 09:33:02 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/2009/07/03/serialization/</guid>
		<description><![CDATA[WHAT IS SERIALIZATION? Serialization is the process of converting an object or a con-nected graph of objects into a contiguous stream of bytes. Deserialization is the process of converting a contiguous stream of bytes back into its graph of connected objects. The ability to convert objects to and from a byte stream is an incredibly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=85&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>WHAT IS SERIALIZATION?<br />
Serialization is the process of converting an object or a con-nected graph of objects into a contiguous stream of bytes. Deserialization is the process of converting a contiguous stream of bytes back into its graph of connected objects. The ability to convert objects to and from a byte stream is an incredibly useful mechanism. Here are some examples:<br />
• An application&#8217;s state (object graph) can easily be saved in a disk file or database and then restored the next time the application is run. ASP.NET saves and restores session state by way of serialization and deserialization.<br />
• A set of objects can easily be copied to the system&#8217;s clipboard and then pasted into the same or another application. In fact, Windows® Forms uses this procedure.<br />
• A set of objects can be cloned and set aside as a backup while a user manipulates the main set of objects.<br />
• A set of objects can easily be sent over the network to a process running on another machine. The Microsoft® .NET Framework remoting architecture serializes and deserializes objects that are marshaled by value.<br />
Why would you want to use serialization? The two most important reasons are<br />
• to persist the state of an object to a storage medium so an exact copy can be recreated at a later stage, and<br />
• to send the object by value from one application domain to another. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=85&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2009/07/03/serialization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
		<item>
		<title>Garbage Collection</title>
		<link>http://gdeepak1984.wordpress.com/2009/07/02/garbage-collection/</link>
		<comments>http://gdeepak1984.wordpress.com/2009/07/02/garbage-collection/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 13:45:08 +0000</pubDate>
		<dc:creator>gdeepak1984</dc:creator>
				<category><![CDATA[Asp.net]]></category>

		<guid isPermaLink="false">http://gdeepak1984.wordpress.com/2009/07/02/garbage-collection/</guid>
		<description><![CDATA[Garbage collection in .NET By Amit Kukreja and Reshmi Nair .Net is the much hyped revolutionary technology gifted to the programmer&#8217;s community by Microsoft. Many factors make it a must use for most developers. In this article we would like to discuss one of the primary advantages of .NET framework &#8211; the ease in memory [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=83&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Garbage collection in .NET<br />
By Amit Kukreja and Reshmi Nair </p>
<p>.Net is the much hyped revolutionary technology gifted to the programmer&#8217;s community by Microsoft. Many factors make it a must use for most developers. In this article we would like to discuss one of the primary advantages of .NET framework &#8211; the ease in memory and resource management. </p>
<p>Every program uses resources of one sort or another-memory buffers, network connections, database resources, and so on. In fact, in an object-oriented environment, every type identifies some resource available for a program&#8217;s use. To use any of these resources, memory must be allocated to represent the type. </p>
<p>The steps required to access a resource are as follows:</p>
<p>1. Allocate memory for the type that represents the resource.<br />
2. Initialize the memory to set the initial state of the resource and to make the resource usable.<br />
3. Use the resource by accessing the instance members of the type (repeat as necessary).<br />
4. Tear down the state of the resource to clean up.<br />
5. Free the memory.</p>
<p>The garbage collector (GC) of .NET completely absolves the developer from tracking memory usage and knowing when to free memory.</p>
<p>The Microsoft� .NET CLR (Common Language Runtime) requires that all resources be allocated from the managed heap. You never free objects from the managed heap-objects are automatically freed when they are no longer needed by the application.</p>
<p>Memory is not infinite. The garbage collector must perform a collection in order to free some memory. The garbage collector&#8217;s optimizing engine determines the best time to perform a collection, (the exact criteria is guarded by Microsoft) based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.</p>
<p>However for automatic memory management, the garbage collector has to know the location of the roots i.e. it should know when an object is no longer in use by the application. This knowledge is made available to the GC in .NET by the inclusion of a concept know as metadata. Every data type used in .NET software includes metadata that describes it. With the help of metadata, the CLR knows the layout of each of the objects in memory, which helps the Garbage Collector in the compaction phase of Garbage collection. Without this knowledge the Garbage Collector wouldn&#8217;t know where one object instance ends and the next begins.</p>
<p>Garbage Collection Algorithm </p>
<p>Application Roots </p>
<p>Every application has a set of roots. Roots identify storage locations, which refer to objects on the managed heap or to objects that are set to null. </p>
<p>For example:</p>
<p>� All the global and static object pointers in an application.<br />
� Any local variable/parameter object pointers on a thread&#8217;s stack.<br />
� Any CPU registers containing pointers to objects in the managed heap.<br />
� Pointers to the objects from Freachable queue<br />
The list of active roots is maintained by the just-in-time (JIT) compiler and common language runtime, and is made accessible to the garbage collector&#8217;s algorithm.</p>
<p>Implementation </p>
<p>Garbage collection in .NET is done using tracing collection and specifically the CLR implements the Mark/Compact collector. </p>
<p>This method consists of two phases as described below.</p>
<p>Phase I: Mark<br />
Find memory that can be reclaimed.</p>
<p>When the garbage collector starts running, it makes the assumption that all objects in the heap are garbage. In other words, it assumes that none of the application&#8217;s roots refer to any objects in the heap. </p>
<p>The following steps are included in Phase I: </p>
<p>1. The GC identifies live object references or application roots.<br />
2. It starts walking the roots and building a graph of all objects reachable from the roots.<br />
3. If the GC attempts to add an object already present in the graph, then it stops walking down that path. This serves two purposes. First, it helps performance significantly since it doesn&#8217;t walk through a set of objects more than once. Second, it prevents infinite loops should you have any circular linked lists of objects. Thus cycles are handles properly.</p>
<p>Once all the roots have been checked, the garbage collector&#8217;s graph contains the set of all objects that are somehow reachable from the application&#8217;s roots; any objects that are not in the graph are not accessible by the application, and are therefore considered garbage. </p>
<p>Phase II: Compact </p>
<p>Move all the live objects to the bottom of the heap, leaving free space at the top.</p>
<p>Phase II includes the following steps:<br />
1. The garbage collector now walks through the heap linearly, looking for contiguous blocks of garbage objects (now considered free space).<br />
2. The garbage collector then shifts the non-garbage objects down in memory, removing all of the gaps in the heap.<br />
3. Moving the objects in memory invalidates all pointers to the objects. So the garbage collector modifies the application&#8217;s roots so that the pointers point to the objects&#8217; new locations.<br />
4. In addition, if any object contains a pointer to another object, the garbage collector is responsible for correcting these pointers as well.<br />
After all the garbage has been identified, all the non-garbage has been compacted, and all the non-garbage pointers have been fixed-up, a pointer is positioned just after the last non-garbage object to indicate the position where the next object can be added. </p>
<p>Finalization</p>
<p>.Net Framework&#8217;s garbage collection implicitly keeps track of the lifetime of the objects that an application creates, but fails when it comes to the unmanaged resources (i.e. a file, a window or a network connection) that objects encapsulate. </p>
<p>The unmanaged resources must be explicitly released once the application has finished using them. .Net Framework provides the Object.Finalize method: a method that the garbage collector must run on the object to clean up its unmanaged resources, prior to reclaiming the memory used up by the object. Since Finalize method does nothing, by default, this method must be overridden if explicit cleanup is required.</p>
<p>It would not be surprising if you will consider Finalize just another name for destructors in C++. Though, both have been assigned the responsibility of freeing the resources used by the objects, they have very different semantics. In C++, destructors are executed immediately when the object goes out of scope whereas a finalize method is called once when Garbage collection gets around to cleaning up an object.</p>
<p>The potential existence of finalizers complicates the job of garbage collection in .Net by adding some extra steps before freeing an object.</p>
<p>Whenever a new object, having a Finalize method, is allocated on the heap a pointer to the object is placed in an internal data structure called Finalization queue. When an object is not reachable, the garbage collector considers the object garbage. The garbage collector scans the finalization queue looking for pointers to these objects. When a pointer is found, the pointer is removed from the finalization queue and appended to another internal data structure called Freachable queue, making the object no longer a part of the garbage. At this point, the garbage collector has finished identifying garbage. The garbage collector compacts the reclaimable memory and the special runtime thread empties the freachable queue, executing each object&#8217;s Finalize method. </p>
<p>The next time the garbage collector is invoked, it sees that the finalized objects are truly garbage and the memory for those objects is then, simply freed. </p>
<p>Thus when an object requires finalization, it dies, then lives (resurrects) and finally dies again. It is recommended to avoid using Finalize method, unless required. Finalize methods increase memory pressure by not letting the memory and the resources used by that object to be released, until two garbage collections. Since you do not have control on the order in which the finalize methods are executed, it may lead to unpredictable results. </p>
<p>Garbage Collection Performance Optimizations </p>
<p>� Weak references<br />
� Generations</p>
<p>Weak References</p>
<p>Weak references are a means of performance enhancement, used to reduce the pressure placed on the managed heap by large objects.</p>
<p>When a root points to an abject it&#8217;s called a strong reference to the object and the object cannot be collected because the application&#8217;s code can reach the object.</p>
<p>When an object has a weak reference to it, it basically means that if there is a memory requirement &amp; the garbage collector runs, the object can be collected and when the application later attempts to access the object, the access will fail. On the other hand, to access a weakly referenced object, the application must obtain a strong reference to the object. If the application obtains this strong reference before the garbage collector collects the object, then the GC cannot collect the object because a strong reference to the object exists. </p>
<p>The managed heap contains two internal data structures whose sole purpose is to manage weak references: the short weak reference table and the long weak reference table. </p>
<p>Weak references are of two types:<br />
� A short weak reference doesn&#8217;t track resurrection.<br />
i.e. the object which has a short weak reference to itself is collected immediately without running its finalization method.</p>
<p>� A long weak reference tracks resurrection.<br />
i.e. the garbage collector collects object pointed to by the long weak reference table only after determining that the object&#8217;s storage is reclaimable. If the object has a Finalize method, the Finalize method has been called and the object was not resurrected. </p>
<p>These two tables simply contain pointers to objects allocated within the managed heap. Initially, both tables are empty. When you create a WeakReference object, an object is not allocated from the managed heap. Instead, an empty slot in one of the weak reference tables is located; short weak references use the short weak reference table and long weak references use the long weak reference table. </p>
<p>Consider an example of what happens when the garbage collector runs. The diagrams (Figure 1 &amp; 2) below show the state of all the internal data structures before and after the GC runs.</p>
<p> Now, here&#8217;s what happens when a garbage collection (GC) runs: </p>
<p>The garbage collector builds a graph of all the reachable objects. In the above example, the graph will include objects B, C, E, G.<br />
The garbage collector scans the short weak reference table. If a pointer in the table refers to an object that is not part of the graph, then the pointer identifies an unreachable object and the slot in the short weak reference table is set to null. In the above example, slot of object D is set to null since it is not a part of the graph.<br />
The garbage collector scans the finalization queue. If a pointer in the queue refers to an object that is not part of the graph, then the pointer identifies an unreachable object and the pointer is moved from the finalization queue to the freachable queue. At this point, the object is added to the graph since the object is now considered reachable. In the above example, though objects A, D, F are not included in the graph they are treated as reachable objects because they are part of the finalization queue. Finalization queue thus gets emptied.<br />
The garbage collector scans the long weak reference table. If a pointer in the table refers to an object that is not part of the graph (which now contains the objects pointed to by entries in the freachable queue), then the pointer identifies an unreachable object and the slot is set to null. Since both the objects C and F are a part of the graph (of the previous step), none of them are set to null in the long reference table.<br />
The garbage collector compacts the memory, squeezing out the holes left by the unreachable objects. In the above example, object H is the only object that gets removed from the heap and it&#8217;s memory is reclaimed.<br />
 Generations<br />
Since garbage collection cannot complete without stopping the entire program, they can cause arbitrarily long pauses at arbitrary times during the execution of the program. Garbage collection pauses can also prevent programs from responding to events quickly enough to satisfy the requirements of real-time systems. </p>
<p>One feature of the garbage collector that exists purely to improve performance is called generations. A generational garbage collector takes into account two facts that have been empirically observed in most programs in a variety of languages:<br />
   1. Newly created objects tend to have short lives.<br />
   2. The older an object is, the longer it will survive.</p>
<p>Generational collectors group objects by age and collect younger objects more often than older objects. When initialized, the managed heap contains no objects. All new objects added to the heap can be said to be in generation 0, until the heap gets filled up which invokes garbage collection. As most objects are short-lived, only a small percentage of young objects are likely to survive their first collection. Once an object survives the first garbage collection, it gets promoted to generation 1.Newer objects after GC can then be said to be in generation 0.The garbage collector gets invoked next only when the sub-heap of generation 0 gets filled up. All objects in generation 1 that survive get compacted and promoted to generation 2. All survivors in generation 0 also get compacted and promoted to generation 1. Generation 0 then contains no objects, but all newer objects after GC go into generation 0.</p>
<p>Thus, as objects &#8220;mature&#8221; (survive multiple garbage collections) in their current generation, they are moved to the next older generation. Generation 2 is the maximum generation supported by the runtime&#8217;s garbage collector. When future collections occur, any surviving objects currently in generation 2 simply stay in generation 2.</p>
<p>Thus, dividing the heap into generations of objects and collecting and compacting younger generation objects improves the efficiency of the basic underlying garbage collection algorithm by reclaiming a significant amount of space from the heap and also being faster than if the collector had examined the objects in all generations.</p>
<p>A garbage collector that can perform generational collections, each of which is guaranteed (or at least very likely) to require less than a certain maximum amount of time, can help make runtime suitable for real-time environment and also prevent pauses that are noticeable to the user. </p>
<p>Myths Related To Garbage Collection </p>
<p>GC is necessarily slower than manual memory management.<br />
Counter Explanation:<br />
Not necessarily. Modern garbage collectors appear to run as quickly as manual storage allocators (malloc/free or new/delete). Garbage collection probably will not run as quickly as customized memory allocator designed for use in a specific program. On the other hand, the extra code required to make manual memory management work properly (for example, explicit reference counting) is often more expensive than a garbage collector would be.</p>
<p>GC will necessarily make my program pause.<br />
Counter Explanation:<br />
Since garbage collectors usually stop the entire program while seeking and collecting garbage objects, they cause pauses long enough to be noticed by the users. But with the advent of modern optimization techniques, these noticeable pauses can be eliminated.</p>
<p>Manual memory management won&#8217;t cause pauses.<br />
Counter Explanation:<br />
Manual memory management does not guarantee performance. It may cause pauses for considerable periods either on allocation or deallocation.</p>
<p>Programs with GC are huge and bloated; GC isn&#8217;t suitable for small programs or systems.<br />
Counter Explanation:<br />
Though using garbage collection is advantageous in complex systems, there is no reason for garbage collection to introduce any significant overhead at any scale. </p>
<p>I&#8217;ve heard that GC uses twice as much memory.<br />
Counter Explanation:<br />
This may be true of primitive GCs, but this is not generally true of garbage collection. The data structures used for GC need be no larger than those for manual memory management. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gdeepak1984.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gdeepak1984.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gdeepak1984.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gdeepak1984.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gdeepak1984.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gdeepak1984.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gdeepak1984.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gdeepak1984.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gdeepak1984.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gdeepak1984.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gdeepak1984.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gdeepak1984.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gdeepak1984.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gdeepak1984.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gdeepak1984.wordpress.com&amp;blog=5642007&amp;post=83&amp;subd=gdeepak1984&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gdeepak1984.wordpress.com/2009/07/02/garbage-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/49662ef288b4f2489f384d773cd3ab9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gdeepak1984</media:title>
		</media:content>
	</item>
	</channel>
</rss>
