<?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>Nandu310's Blog</title>
	<atom:link href="http://nandu310.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nandu310.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sat, 19 Nov 2011 04:54:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nandu310.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nandu310's Blog</title>
		<link>http://nandu310.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nandu310.wordpress.com/osd.xml" title="Nandu310&#039;s Blog" />
	<atom:link rel='hub' href='http://nandu310.wordpress.com/?pushpress=hub'/>
		<item>
		<title>compendium of DBMS</title>
		<link>http://nandu310.wordpress.com/2010/06/09/compendium-of-dbms/</link>
		<comments>http://nandu310.wordpress.com/2010/06/09/compendium-of-dbms/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 11:54:10 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=200</guid>
		<description><![CDATA[Data Every organization has infornmation needs. A library maintains a list of members, books, due dates, and fines. A company maintains information about employees, departments, and salaries. These pieces of information are called data. Data storage on different media Organizations can store data on various media and in different formats. For example, a hardcopy document [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=200&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Data</strong></p>
<p>Every organization has infornmation needs. A library maintains a list of members, books, due dates, and fines. A company maintains information about employees, departments, and salaries. These pieces of information are called data.</p>
<p><img src="http://nandu310.files.wordpress.com/2010/06/1.jpg?w=300&#038;h=209" alt="" title="1" width="300" height="209" class="aligncenter size-medium wp-image-201" /></p>
<p><strong>Data storage on different media</strong></p>
<p>Organizations can store data on various media and in different formats. For example, a hardcopy document can be stored in a filing cabinet. In addition, you can store data in an electronic spreadsheet or in a database.</p>
<p><img src="http://nandu310.files.wordpress.com/2010/06/2.jpg?w=300&#038;h=174" alt="" title="2" width="300" height="174" class="aligncenter size-medium wp-image-204" /></p>
<p><strong>Database</strong></p>
<p>Coherent collection of data records is called database. in other words, database is an organized collection of information. The benefit of storing information in database is that data becomes easy to access and manage.</p>
<p><img src="http://nandu310.files.wordpress.com/2010/06/3.jpg?w=204&#038;h=254" alt="" title="3" width="204" height="254" class="aligncenter size-full wp-image-207" /></p>
<p>in layman terms Database is like an almirah with different compartments with specific labels on each one of them. Whenever you want to take out or put in something, you first search the compartment and then take out or put in required things from/to the compartments.</p>
<p><strong>Advantages of using database</strong></p>
<ul>
<li>Reduction in data redundancy</li>
<li>Increased consistency</li>
<li>More data integrity</li>
<li>Independence from applications programs i.e., data independence</li>
<li>Data security and crash recovery</li>
<li>Improvement in data access by using host and query languages</li>
<li>Conacurrent data access</li>
</ul>
<p><strong>Disadvantages of using database</strong></p>
<ul>
<li>They are complex and difficult to use</li>
<li>Time-consuming to design</li>
<li>Start-up costs regarding hardware and software</li>
<li>requirs a deep technical knowhow and Initial training required for all programmers and users</li>
<li>Extensive conversion costs in moving form a file-based system to a database system</li>
<li>A Damage to database will affect all applications programs so there is a need for backup</li>
</ul>
<p><strong>Database Management</strong></p>
<p>Doing operations like insertion, deletion and updating is called managing the database.</p>
<p><strong>Database Management System (DBMS)</strong></p>
<p>To manage data efficiently we need a database management system. It is a system that stores, modifies and retrieves data in the database on request. It is a collection of programs that allow users to work on large data without any problems.</p>
<p><img src="http://nandu310.files.wordpress.com/2010/06/4.jpg?w=300&#038;h=177" alt="" title="4" width="300" height="177" class="aligncenter size-medium wp-image-213" /></p>
<p><strong>Database Types</strong></p>
<p>based on the way in which data is stored, databses are divided into different categories. they are Hierarchical, network, relational and more recently object relational.</p>
<p><img src="http://nandu310.files.wordpress.com/2010/06/5.jpg?w=300&#038;h=175" alt="" title="5" width="300" height="175" class="aligncenter size-medium wp-image-215" /></p>
<p>The databases that use the tree format storage and contains one parent are called hierarchical database management systems. The databases that uses the tree format storage and contains more than one parent are called network database management systems. The databases that use the table format storage are called relational database management systems (RDBMS).The databases that use the object type format storage are called object relational database management systems (ORDBMS).</p>
<p><img src="http://nandu310.files.wordpress.com/2010/06/6.jpg?w=300&#038;h=160" alt="" title="6" width="300" height="160" class="aligncenter size-medium wp-image-218" /></p>
<p>Before 1970, hierarchical and network data structures were more popular models for information storage. These models depend on the structure of the data and the way information is linked in the hierarchy or network.</p>
<p>based on its distribution also database is divided into three types. they are Centralized, Distributed and Homogeneous databases.</p>
<p>If the data is stored at a single computer site then it is called centralized database.</p>
<p>If the database and DBMS software are distributed over many sites then the database system is called distributed database system.</p>
<p>If the database system uses the same DBMS software at multiple sites then the database system is called homogeneous database system.</p>
<p><strong>Definition of relational database</strong></p>
<p><img src="http://nandu310.files.wordpress.com/2010/06/8.jpg?w=300&#038;h=176" alt="" title="8" width="300" height="176" class="aligncenter size-medium wp-image-221" /></p>
<p>A relational database is a collection of relations or two-dimentional tables. A relational database uses these two-dimensional tables to store the data.</p>
<p><strong>Components of the relational datbase model</strong></p>
<p><img src="http://nandu310.files.wordpress.com/2010/06/9.jpg?w=300&#038;h=146" alt="" title="9" width="300" height="146" class="aligncenter size-medium wp-image-222" /></p>
<p>The relational database model mainly consists of three components. They are a collection of database objects or relations, set of operations, and data integrity rules. The tables are the objects in the relational database model. </p>
<p><strong>DBMS Systems in use</strong></p>
<p>There are innumerable numbers of DBMS software available in the market. Some of the most popular ones include Oracle, IBM’s DB2, Microsoft Access, Microsoft SQL Server, MySQL, Sybase, PostGreSql,Predator and FileMaker. MySQL, one of the most popular open source database management systems used by online entrepreneurs is one example of an object-oriented DBMS. Microsoft Access (another popular DBMS) on the other hand is not a fully object oriented system, even though it does flaunt certain aspects of it. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=200&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2010/06/09/compendium-of-dbms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/06/1.jpg?w=300" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/06/2.jpg?w=300" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/06/3.jpg" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/06/4.jpg?w=300" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/06/5.jpg?w=300" medium="image">
			<media:title type="html">5</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/06/6.jpg?w=300" medium="image">
			<media:title type="html">6</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/06/8.jpg?w=300" medium="image">
			<media:title type="html">8</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/06/9.jpg?w=300" medium="image">
			<media:title type="html">9</media:title>
		</media:content>
	</item>
		<item>
		<title>Chronicle of Unix</title>
		<link>http://nandu310.wordpress.com/2010/04/20/chronicle-of-unix/</link>
		<comments>http://nandu310.wordpress.com/2010/04/20/chronicle-of-unix/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 11:54:50 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=148</guid>
		<description><![CDATA[Situation of Computer science and OS before Unix Computer systems didn&#8217;t talk to each other in the early days of computing. Even the various computer lines made by the same company often needed interpreters. And forget any interoperability of systems by different vendors! In addition, operating systems very often performed only limited tasks, and only [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=148&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Situation of Computer science and OS before Unix</strong></p>
<p>Computer systems didn&#8217;t talk to each other in the early days of computing. Even the various computer lines made by the same company often needed interpreters. And forget any interoperability of systems by different vendors!</p>
<p>In addition, operating systems very often performed only limited tasks, and only on the machines for which they were written. If a business upgraded to a bigger, more powerful computer, the old operating system probably wouldn&#8217;t work on the new computer, and often the company&#8217;s data had to be entered &#8212; again &#8212; into the new machine.</p>
<p><strong>The first step towards UNIX&#8211;Multics</strong></p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/optimized_image_89d08b6d.png"><img src="http://nandu310.files.wordpress.com/2010/04/optimized_image_89d08b6d.png?w=150&#038;h=44" alt="" title="Optimized_image_89d08b6d" width="150" height="44" class="aligncenter size-thumbnail wp-image-162" /></a><br />
To try to develop a convenient, interactive, useable computer system that could support many users, a group of computer scientists from Bell Labs and GE in 1965 joined an effort underway at MIT on what was called the Multics (Multiplexed Information and Computing Service) mainframe timesharing system.</p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/multics.png"><img src="http://nandu310.files.wordpress.com/2010/04/multics.png?w=231&#038;h=300" alt="" title="multics" width="231" height="300" class="aligncenter size-medium wp-image-193" /></a><br />
Over time, hope was replaced by frustration as the group effort initially failed to produce an economically useful system. Bell Labs withdrew from the effort in 1969 but a small band of users at Bell Labs Computing Science Research Center continued to seek the Holy Grail.</p>
<p><strong>How Multics life ended</strong></p>
<p>Actually, Multics worked, and eventually became a product, but not initially on the scale its developers wanted. Multics could not then support many users and in 1969, ken Thompson began trying to find an alternative to Multics. Thompson decided to satisfy two urges: to write an operating system of his own, and to create an environment in which to do future work.</p>
<p><strong>The First Machine</strong></p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/kd14.jpg"><img src="http://nandu310.files.wordpress.com/2010/04/kd14.jpg?w=300&#038;h=240" alt="" title="kd14" width="300" height="240" class="aligncenter size-medium wp-image-163" /></a><br />
It did not take long, therefore, for Thompson to find a little-used PDP-7 computer with an excellent display processor. They borrowed it from a company for writing operating system. The configuration of PDP-7 was too high at that time. It has got a RAM of 1kb and 40 kb of memory. Instead of keyboard it used to have a type writer.  The cost of the machine is also not affordable and it was around 70000 dollars at that time. It was 10 times the present version of normal cell phones.</p>
<p><strong>The Development of Unix</strong></p>
<p>Dennis Ritchie insisted Thompson using FORTRAN to write the Operating system but within 4 hours of started writing they gave up. The main reason for this is because of the non-availability of the data structures in FORTRAN language. Then he wrote a very simple language called B, which he got going on the PDP-7.<br />
<a href="http://nandu310.files.wordpress.com/2010/04/richard_matthew_stallman_cropped.jpg"><img src="http://nandu310.files.wordpress.com/2010/04/richard_matthew_stallman_cropped.jpg?w=117&#038;h=150" alt="" title="Richard_Matthew_Stallman_cropped" width="117" height="150" class="alignleft size-thumbnail wp-image-154" /></a><br />
<a href="http://nandu310.files.wordpress.com/2010/04/dennis-19972.jpg"><img src="http://nandu310.files.wordpress.com/2010/04/dennis-19972.jpg?w=120&#038;h=150" alt="" title="dennis-1997" width="120" height="150" class="aligncenter size-thumbnail wp-image-158" /></a><br />
It worked, but there were problems. First, because the implementation was interpreted, it was always going to be slow. Finally, they decided to use C to write the operating system they wanted.  In 1971, the new operating system using C came to reality. Novices to the system started experimenting by linking different commands together for what they thought should be the output. Joe Condon, the owner of the PDP-7 that Thompson first used for UNIX, started using UNIX himself.</p>
<p><strong>Manual of Unix</strong></p>
<p>Most manuals are often an afterthought, something cobbled together after the product is made. The UNIX manual, in contrast, reflected the philosophy of UNIX in design and content. It even told you where the bugs were. The manual style initially was set by Ritchie, but McIlroy soon took over its compilation. From then on they started distributing the operating system for the needy.</p>
<p><strong>Introduction of New Unix Flavors</strong></p>
<p>In 1971, government introduced a law saying the companies can’t distribute the software they developed and they also demanded that they should be used for the official use only.</p>
<p>Thompson was very upset with the government regulation and took a sabbatical break of 6 months from BELL and started teaching UNIX system as a visiting professor at the Computer Science Department of University of California-Berkeley (UCB). While there, he also developed a new flavor of UNIX called BSD software (Berkeley Software Distribution). It is known for its high load carrying capacity. Other two Open BSD and Net BSD are known for their security and portability respectively.</p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/openbsd_logo_2a.gif"><img src="http://nandu310.files.wordpress.com/2010/04/openbsd_logo_2a.gif?w=150&#038;h=97" alt="" title="OpenBSD_Logo_2a" width="150" height="97" class="alignleft size-thumbnail wp-image-165" /></a><br />
<a href="http://nandu310.files.wordpress.com/2010/04/netbsd-logo.jpg"><img src="http://nandu310.files.wordpress.com/2010/04/netbsd-logo.jpg?w=150&#038;h=114" alt="" title="netbsd-logo" width="150" height="114" class="aligncenter size-thumbnail wp-image-166" /></a></p>
<p><strong>Symbolics and its End</strong></p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/symbolic_logo2.jpg"><img src="http://nandu310.files.wordpress.com/2010/04/symbolic_logo2.jpg?w=300&#038;h=135" alt="" title="symbolic_logo" width="300" height="135" class="aligncenter size-medium wp-image-189" /></a><br />
In 1980’s most of the coders used to work in AI lab of Massachusetts Institute of Technology (MIT). Till date they are considered as the most efficient and good programmers. They wrote many softwares and distributed them to various people. Then suddenly one day a company called Symbolics came to the scene and hired all of them with huge packages and perks. This the first dot come company in the world. All the good programmers started working for Symbolics and within 6 months they stopped sharing codes because of the company policies.<br />
Symbolics people were able to hire every programmer from UCB except one. He is Richard Stallman Mathews. He was upset with the Symbolics Company’s strategy and started producing all the software that Symbolics made and selling with huge price. He distributed those softwares for free. Because of that in 6 months Symbolics was bankrupt.</p>
<p><strong>GNU and GPL</strong></p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/bokma-gnu2.png"><img src="http://nandu310.files.wordpress.com/2010/04/bokma-gnu2.png?w=150&#038;h=139" alt="" title="bokma-gnu" width="150" height="139" class="aligncenter size-thumbnail wp-image-186" /></a></p>
<p>Then he stopped troubling Symbolix and started an organization called GNU pronounced as ganu. The full form of it is GNU is not Unix. With the help of this organization he produced softwares and gave away for free. He also made a license called GPL i.e., general public license. The symbol for it is copy left. According to the GPL, once you buy a software you are free to do anything with it. Only condition is that if u want to give it to anyone you have give it without hiding the source code and for free.</p>
<p> <a href="http://nandu310.files.wordpress.com/2010/04/copyright2.gif"><img src="http://nandu310.files.wordpress.com/2010/04/copyright2.gif?w=50&#038;h=50" alt="" title="copyright" width="50" height="50" class="aligncenter size-thumbnail wp-image-187" /></a><br />
<a href="http://nandu310.files.wordpress.com/2010/04/512px-copyleft_svg2.png"><img src="http://nandu310.files.wordpress.com/2010/04/512px-copyleft_svg2.png?w=50&#038;h=50" alt="" title="512px-Copyleft_svg" width="50" height="50" class="aligncenter size-thumbnail wp-image-188" /></a></p>
<p><strong>Kernel</strong></p>
<p>Richard Stallman had everything from GCC Compiler to Emacs Editor, but he did not have the kernel. He started writing a kernel named Hurd on his own. At the same point of time a 21 year old guy called Linux Torvalds wrote a kernel on his own. People suggested Stallman to use that kernel, instead of writing a new one. So he used it and formed GNU LINUX.<br />
<a href="http://nandu310.files.wordpress.com/2010/04/linus_torvalds_cropped2.jpg"><img src="http://nandu310.files.wordpress.com/2010/04/linus_torvalds_cropped2.jpg?w=117&#038;h=150" alt="" title="Linus_Torvalds_cropped" width="117" height="150" class="aligncenter size-thumbnail wp-image-191" /></a><br />
kernel is the central component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel&#8217;s responsibilities include managing the system&#8217;s resources.</p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/linux-kernel1.png"><img src="http://nandu310.files.wordpress.com/2010/04/linux-kernel1.png?w=200&#038;h=300" alt="" title="linux-kernel" width="200" height="300" class="aligncenter size-medium wp-image-183" /></a><br />
Main parts of any OS are user space and kernel space. In GNU Linux, GNU is user space and Linux is the kernel space. In this 20 to 30 MB is the KERNEL and the rest is the GNU. In this combination one replace either GNU or LINUX with the appropriate one. Some companies use GNU without Linux and some people use Linux without GNU.</p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/kernel-shell1.jpg"><img src="http://nandu310.files.wordpress.com/2010/04/kernel-shell1.jpg?w=150&#038;h=141" alt="" title="kernel-shell" width="150" height="141" class="aligncenter size-thumbnail wp-image-184" /></a></p>
<p>Kernel is secret thing and Shell covers it and protects it.</p>
<p><strong>Shell</strong></p>
<p><a href="http://nandu310.files.wordpress.com/2010/04/shell1.jpg"><img src="http://nandu310.files.wordpress.com/2010/04/shell1.jpg?w=300&#038;h=258" alt="" title="shell" width="300" height="258" class="aligncenter size-medium wp-image-185" /></a><br />
A shell in Unix is a command-line interpreter and script host that provides a traditional user interface for the Unix operating system and for Unix-like systems. Users direct the operation of the computer by entering command input as text for a command line interpreter to execute or by creating text scripts of one or more such commands. Kernel takes that command and interacts with the hardware and software to respond to the given command.</p>
<blockquote><p>Is it necessary?</p></blockquote>
<p>There is no need of shell for the OS that does not have any user interface. The shell used by MSDOS is command.exe and the shell name of Windows is explorer.exe</p>
<p><strong>Development of shells</strong></p>
<p>The first shell developed was Thompson shell. It was written by him and he is the only guy to use it. It was termed as an ugly shell by the people.</p>
<p>Then a guy named Steve Bourne developed a shell named bourn shell. It is commonly called as sh. It was good for programming but not for simple use.</p>
<p>In the meantime one more guy named bill joy developed a shell called CShell. It is commonly called as csh. He is the author of vi-editor and as well as the co-founder of sun micro systems. csh was not programmer friendly.</p>
<p>The K shell is the shell developed by David Korn from AT&amp;T Bell Laboratories. People think that Korn shell and kshell are same. But there is difference. The difference is kshell is the tool and Korn shell is the language used in kshell. It is similar to C and TourboC, where TourboC is the tool and c is the language. The disadvantage of kshell is its cost. It is too costly.</p>
<p>Bash is the shell developed by brain fox. It is also called as born again shell. It is for free.</p>
<p><strong>Shell scripting </strong></p>
<p>Shell Script is series of command written in plain text file. Shell script is just like batch file is MS-DOS but have more power than the MS-DOS batch file.</p>
<p><strong>Why shell scripts</strong></p>
<ul>
<li>Shell script can take input from user, file and output them on screen.</li>
<li>Useful to create our own commands.</li>
<li>Save lots of time.</li>
<li>To automate some task of day today life.</li>
<li>System Administration part can be also automated.</li>
</ul>
<p><strong>Advantages of shell scripting</strong></p>
<ul>
<li>Commands can be used directly</li>
<li>Length of a typical shell script is one tenth of a C Program meant for the same cause</li>
<li>It is easy to learn</li>
<li>It has got a very easy learning curve</li>
</ul>
<p><strong>Disadvantages of shell scripting</strong></p>
<ul>
<li>In shell scripts we use commands that means each time we use a command it calls an external command and the execution becomes slow</li>
<li>Shell scripts cannot connect to the database directly. They need some third party libraries.</li>
</ul>
<p><strong>Shell that can be used for scripting</strong></p>
<p>Tcsh is the advanced version of csh. Bash, sh, ksh are very handy in writing shell scripts where as csh, tcsh are not that much useful because of non-powerful loops and aliases. They are not shell scripting shells.</p>
<p><strong>Various flavors of UNIX that are in use</strong></p>
<ul>
<li>Aix from IBM</li>
<li>Solaris from Sun</li>
<li>HP-UX from HP</li>
<li>SCO from SCO Inc.</li>
<li>Digital Unix from digital Corporation</li>
<li>True 64 from Compact</li>
<li>Irix from Silicon Graphics</li>
<li>MacOS from Apple</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=148&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2010/04/20/chronicle-of-unix/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/optimized_image_89d08b6d.png?w=150" medium="image">
			<media:title type="html">Optimized_image_89d08b6d</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/multics.png?w=231" medium="image">
			<media:title type="html">multics</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/kd14.jpg?w=300" medium="image">
			<media:title type="html">kd14</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/richard_matthew_stallman_cropped.jpg?w=117" medium="image">
			<media:title type="html">Richard_Matthew_Stallman_cropped</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/dennis-19972.jpg?w=120" medium="image">
			<media:title type="html">dennis-1997</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/openbsd_logo_2a.gif?w=150" medium="image">
			<media:title type="html">OpenBSD_Logo_2a</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/netbsd-logo.jpg?w=150" medium="image">
			<media:title type="html">netbsd-logo</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/symbolic_logo2.jpg?w=300" medium="image">
			<media:title type="html">symbolic_logo</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/bokma-gnu2.png?w=150" medium="image">
			<media:title type="html">bokma-gnu</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/copyright2.gif?w=150" medium="image">
			<media:title type="html">copyright</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/512px-copyleft_svg2.png?w=150" medium="image">
			<media:title type="html">512px-Copyleft_svg</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/linus_torvalds_cropped2.jpg?w=117" medium="image">
			<media:title type="html">Linus_Torvalds_cropped</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/linux-kernel1.png?w=200" medium="image">
			<media:title type="html">linux-kernel</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/kernel-shell1.jpg?w=150" medium="image">
			<media:title type="html">kernel-shell</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2010/04/shell1.jpg?w=300" medium="image">
			<media:title type="html">shell</media:title>
		</media:content>
	</item>
		<item>
		<title>C-concepts: Part1</title>
		<link>http://nandu310.wordpress.com/2009/12/22/c-concepts-part1/</link>
		<comments>http://nandu310.wordpress.com/2009/12/22/c-concepts-part1/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 08:17:27 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=139</guid>
		<description><![CDATA[declaration and definition of a variable/function Declaration of a variable/function simply declares that the variable/function exists somewhere in the program but the memory is not allocated for them. But the declaration of a variable/function serves an important role. And that is the type of the variable/function. Therefore, when a variable is declared, the program knows [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=139&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>declaration and definition of a variable/function</strong></p>
<p>Declaration of a variable/function simply declares that the variable/function exists somewhere in the program but the memory is not allocated for them. But the declaration of a variable/function serves an important role. And that is the type of the variable/function. Therefore, when a variable is declared, the program knows the data type of that variable. In case of function declaration, the program knows what are the arguments to that functions, their data types, the order of arguments and the return type of the function. So that’s all about declaration. Coming to the definition, when we define a variable/function, apart from the role of declaration, it also allocates memory for that variable/function. Therefore, we can think of definition as a super set of declaration. (or declaration as a subset of definition). From this explanation, it should be obvious that a variable/function can be declared any number of times but it can be defined only once. (Remember the basic principle that you can’t have two locations of the same variable/function). So that’s all about declaration and definition.</p>
<p><strong>Understanding “extern” keyword in C</strong></p>
<p>it’s mandatory to understand declaration/defination to understand the “extern” keyword. Let us first take the easy case. Use of extern with C functions. By default, the declaration and definition of a C function have “extern” prepended with them. It means even though we don’t use extern with the declaration/definition of C functions, it is present there. For example, when we write.</p>
<p>    int foo(int arg1, char arg2);</p>
<p>There’s an extern present in the beginning which is hidden and the compiler treats it as below.</p>
<p>    extern int foo(int arg1, char arg2);</p>
<p>Same is the case with the definition of a C function (Definition of a C function means writing the body of the function). Therefore whenever we define a C function, an extern is present there in the beginning of the function definition. Since the declaration can be done any number of times and definition can be done only once, we can notice that declaration of a function can be added in several C/H files or in a single C/H file several times. But we notice the actual definition of the function only once (i.e. in one file only). And as the extern extends the visibility to the whole program, the functions can be used (called) anywhere in any of the files of the whole program provided the declaration of the function is known. (By knowing the declaration of the function, C compiler knows that the definition of the function exists and it goes ahead to compile the program). So that’s all about extern with C functions.</p>
<p>Now let us the take the second and final case i.e. use of extern with C variables. I feel that it more interesting and information than the previous case where extern is present by default with C functions. So let me ask the question, how would you declare a C variable without defining it? Many of you would see it trivial but it’s important question to understand extern with C variables. The answer goes as follows.</p>
<p>    extern int var;</p>
<p>Here, an integer type variable called var has been declared (remember no definition i.e. no memory allocation for var so far). And we can do this declaration as many times as needed. (remember that declaration can be done any number of times) So far so good. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now how would you define a variable. Now I agree that it is the most trivial question in programming and the answer is as follows.</p>
<p>    int var;</p>
<p>Here, an integer type variable called var has been declared as well as defined. (remember that definition is the super set of declaration). Here the memory for var is also allocated. Now here comes the surprise, when we declared/defined a C function, we saw that an extern was present by default. While defining a function, we can prepend it with extern without any issues. But it is not the case with C variables. If we put the presence of extern in variable as default then the memory for them will not be allocated ever, they will be declared only. Therefore, we put extern explicitly for C variables when we want to declare them without defining them. Also, as the extern extends the visibility to the whole program, by externing a variable we can use the variables anywhere in the program provided we know the declaration of them and the variable is defined somewhere.</p>
<p>Now let us try to understand extern with examples.</p>
<p>Example 1:<br />
int var;<br />
int main(void)<br />
{<br />
   var = 10;<br />
   return 0;<br />
}</p>
<p>Analysis: This program is compiled successfully. Here var is defined (and declared implicitly) globally.</p>
<p>Example 2:<br />
extern int var;<br />
int main(void)<br />
{<br />
  return 0;<br />
}</p>
<p>Analysis: This program is compiled successfully. Here var is declared only. Notice var is never used so no problems.</p>
<p>Example 3:<br />
extern int var;<br />
int main(void)<br />
{<br />
 var = 10;<br />
 return 0;<br />
}</p>
<p>Analysis: This program throws error in compilation. Because var is declared but not defined anywhere. Essentially, the var isn’t allocated any memory. And the program is trying to change the value to 10 of a variable that doesn’t exist at all.</p>
<p>Example 4:<br />
#include &#8220;somefile.h&#8221;<br />
extern int var;<br />
int main(void)<br />
{<br />
 var = 10;<br />
 return 0;<br />
}</p>
<p>Analysis: Supposing that somefile.h has the definition of var. This program will be compiled successfully.</p>
<p>Example 5:<br />
extern int var = 0;<br />
int main(void)<br />
{<br />
 var = 10;<br />
 return 0;<br />
}</p>
<p>Analysis: Guess this program will work? Well, here comes another surprise from C standards. They say that..if a variable is only declared and an initializer is also provided with that declaration, then the memory for that variable will be allocated i.e. that variable will be considered as defined. Therefore, as per the C standard, this program will compile successfully and work.</p>
<p>So that was a preliminary look at “extern” keyword in C.</p>
<p>I’m sure that you want to have some take away from the reading of this post. And I would not disappoint you. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
In short, we can say</p>
<p>1. Declaration can be done any number of times but definition only once.<br />
2. “extern” keyword is used to extend the visibility of variables/functions().<br />
3. Since functions are visible through out the program by default. The use of extern is not needed in function declaration/definition. Its use is redundant.<br />
4. When extern is used with a variable, it’s only declared not defined.<br />
5. As an exception, when an extern variable is declared with initialization, it is taken as definition of the variable as well.</p>
<p><strong>Mystery of Bigendian and Littleendian</strong></p>
<blockquote><p>What are these?</p></blockquote>
<p>Little and big endian are two ways of storing multibyte data-types ( int, float, etc). In little endian machines, last byte of binary representation of the multibyte data-type is stored first. On the other hand, in big endian machines, first byte of binary representation of the multibyte data-type is stored last.</p>
<p>Suppose integer is stored as 4 bytes (For those who are using DOS based compilers such as C++ 3.0 , integer is 2 bytes) then a variable x with value 0×01234567 will be stored as following.</p>
<p><a href="http://nandu310.files.wordpress.com/2009/12/lb.png"><img src="http://nandu310.files.wordpress.com/2009/12/lb.png?w=400&#038;h=200" alt="" title="lb" width="400" height="200" class="aligncenter size-full wp-image-142" /></a></p>
<blockquote><p>How to see memory representation of multibyte data types on your machine?</p></blockquote>
<p>Here is a sample C code that shows the byte representation of int, float and pointer.<br />
#include </p>
<p>/* function to show bytes in memory, from location start to start+n*/<br />
void show_mem_rep(char *start, int n)<br />
{<br />
    int i;<br />
    for (i = 0; i &lt; n; i++)<br />
         printf(&quot; %.2x&quot;, start[i]);<br />
    printf(&quot;\n&quot;);<br />
}</p>
<p>/*Main function to call above function for 0&#215;01234567*/<br />
int main()<br />
{<br />
   int i = 0&#215;01234567;<br />
   show_mem_rep((char *)&amp;i, sizeof(i));<br />
   getchar();<br />
   return 0;<br />
}</p>
<p>When above program is run on little endian machine, gives “67 45 23 01″ as output , while if it is run on endian machine, gives “01 23 45 67″ as output.</p>
<blockquote><p>Is there a quick way to determine endianness of your machine?</p></blockquote>
<p>There are n no. of ways for determining endianness of your machine. Here is one quick way of doing the same.<br />
#include<br />
int main()<br />
{<br />
   unsigned int i = 1;<br />
   char *c = (char*)&amp;i;<br />
   if (*c)<br />
       printf(&#8220;Little endian&#8221;);<br />
   else<br />
       printf(&#8220;Big endian&#8221;);<br />
   getchar();<br />
   return 0;<br />
}</p>
<p>In the above program, a character pointer c is pointing to an integer i. Since size of character is 1 byte when the character pointer is de-referenced it will contain only first byte of integer. If machine is little endian then *c will be 1 (because last byte is stored first) and if machine is big endian then *c will be 0.</p>
<blockquote><p>Does endianness matter for programmers?</p></blockquote>
<p>Most of the times compiler takes care of endianness, however, endianness becomes an issue in following cases.</p>
<p>It matters in network programming: Suppose you write integers to file on a little endian machine and you transfer this file to a big endian machine. Unless there is little andian to big endian transformation, big endian machine will read the file in reverse order. You can find such a practical example here.</p>
<p>Standard byte order for networks is big endian, also known as network byte order. Before transferring data on network, data is first converted to network byte order (big endian).</p>
<p>Sometimes it matters when you are using type casting, below program is an example.<br />
#include<br />
int main()<br />
{<br />
    unsigned char arr[2] = {0&#215;01, 0&#215;00};<br />
    unsigned short int x = *(unsigned short int *) arr;<br />
    printf(&#8220;%d&#8221;, x);<br />
    getchar();<br />
    return 0;<br />
}</p>
<p>In the above program, a char array is typecasted to an unsigned short integer type. When I run above program on little endian machine, I get 1 as output, while if I run it on a big endian machine I get 512. To make programs endianness independent, above programming style should be avoided.</p>
<blockquote><p>What are bi-endians?</p></blockquote>
<p>Bi-endian processors can run in both modes little and big endian.</p>
<p>What are the examples of little, big endian and bi-endian machines ?<br />
Intel based processors are little endians. ARM processors were little endians. Current generation ARM processors are bi-endian.</p>
<p>Motorola 68K processors are big endians. PowerPC (by Motorola) and SPARK (by Sun) processors were big endian. Current version of these processors are bi-endians.</p>
<blockquote><p>Does endianness effects file formats?</p></blockquote>
<p>File formats which have 1 byte as a basic unit are independent of endianness e..g., ASCII files . Other file formats use some fixed endianness forrmat e.g, JPEG files are stored in big endian format.</p>
<blockquote><p>Which one is better — little endian or big endian</p></blockquote>
<p>The term little and big endian came from Gulliver’s Travels by Jonathan Swift. Two groups could not agree by which end a egg should be opened -a-the little or the big. Just like the egg issue, there is no technological reason to choose one byte ordering convention over the other, hence the arguments degenerate into bickering about sociopolitical issues. As long as one of the conventions is selected and adhered to consistently, the choice is arbitrary.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=139&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2009/12/22/c-concepts-part1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/12/lb.png" medium="image">
			<media:title type="html">lb</media:title>
		</media:content>
	</item>
		<item>
		<title>Memory Areas in C Language</title>
		<link>http://nandu310.wordpress.com/2009/11/09/memory-areas-in-c-language/</link>
		<comments>http://nandu310.wordpress.com/2009/11/09/memory-areas-in-c-language/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 02:43:12 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=116</guid>
		<description><![CDATA[When we come across memory segments in C program these are the questions that comes to our mind. What happens when a c program is loaded into memory? Where are the different types of variables allocated? Why do we need two data sections, initialized and un-initialized? If we initialize a static or global variable with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=116&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>When we come across memory segments in C program these are the questions that comes to our mind.</p>
<ul>
<li>What happens when a c program is loaded into memory? </li>
<li>Where are the different types of variables allocated?</li>
<li>Why do we need two data sections, initialized and un-initialized? </li>
<li>If we initialize a static or global variable with 0 where will it be stored?</li>
</ul>
<p></strong><br />
Even though the scope of global and static variables are different, why are they stored in same section i.e., data segment?</p>
<p>Let’s look at some of these interesting under hood details here. We know that a C program which is compiled to an executable and loaded into memory for execution has 4 main segments in memory. They are data, code, stack, and heap segments.</p>
<p><img src="http://nandu310.files.wordpress.com/2009/11/cmemory0031.png?w=293&#038;h=319" alt="cmemory003" title="cmemory003" width="293" height="319" class="alignleft size-full wp-image-134" /><br />
<img src="http://nandu310.files.wordpress.com/2009/11/memorylayout.png?w=450&#038;h=362" alt="Memorylayout" title="Memorylayout" width="450" height="362" class="alignright size-full wp-image-135" /></p>
<p>Global and function static variables are allocated in the data segment. The compiler converts the executable statements in C program such as printf(“hello world”); into machine code. They are loaded in the code segment. When the program executes, function calls are made. Executing each function requires allocation of memory, as if in a frame to store different information like the return pointer, local variable&#8230;etc. since this allocation is done in the stack, these are known as stack frames. When we do dynamic memory allocation, such as the use of the malloc function, memory is allocated in the heap area.<br />
Static and Dynamic Segments</p>
<p><img src="http://nandu310.files.wordpress.com/2009/11/ccompilerlinker006.png?w=450&#038;h=657" alt="ccompilerlinker006" title="ccompilerlinker006" width="450" height="657" class="aligncenter size-full wp-image-137" /></p>
<p>The data and code segments are of fixed size. When a program is compiled, at that point itself, the sizes required for the segments are fixed and known. Hence they are known as static segments. The sizes of the stack and heap areas are not known when the program gets compiled. Also it is possible to change or configure the sizes of these areas (i.e., increase or decrease). So, these are called dynamic segments.<br />
Let’s look at each of these segments in detail.</p>
<p><strong>Data segment</strong>:- the data segment is to hold the value of those variables that need to be available throughout the life time of the program. So it is obvious that global variables should be allocated in the data segment. How about local variables declared as static? Yes, they are also allocated in the data area because their values should be available across function calls. If they are allocated in the stack frame itself, they will get destroyed once the function returns. The only option is to allocate them in a global area. Hence, they are allocated in this segment. So, the life time of a local static variable is that of the life time of the program.</p>
<p>There are two parts in this segment. The initialized data segment and u-initialized data segment.<br />
When variables are initialized to some value (other than 0 or which is different value), they are allocated in the initialized segment. When the variables are un initialized they get allocated in the un-initialized data segment. This segment is usually referred to with cryptic acronym called BSS. It stands for block starting with symbol and gets its name from old IBM systems which had that segments initialized to zero.<br />
The data area is separated into two based on explicit initialization, because the variables that are need to be initialized need not be initialized with zeros one by one. However the variables that are not initialized need not to be explicitly initialized with zeros one by one. Instead the job of initialization of variables to zero is left to the operating system to take care of. This bulk initialization can greatly reduce the time required to load.</p>
<p>When we want to run an executable program, the OS starts a program known as loader. When this loads the file into memory, it takes the BSS segment and initializes the whole thing to zeros. That is why the un-initialized global data and static data always get the default value of zero.</p>
<p>The layout of data segment is in the control of the underlying OS. However some loaders give partial control to the users. This information may be useful in applications such as embedded systems.<br />
The data area can be addressed and accessed using pointers from the code. Automatic variables have an overhead in initializing the variables each time they are required, and code is required to do that initialization. However, variables in the data area do not have such runtime overhead, because the initialization is done only once and that too at loading time.</p>
<p><strong>Code segment</strong>:- the program code is where the executable code is available for execution. This area is also known as the text segment and is of fixed size. This can be accessed only by function pointers and not by other data pointers. Another important piece of information to take note of here is that the system may consider this area as a read only memory area and any attempt to write in this area can lead to undefined behavior.</p>
<p><strong>Stack and heap segments</strong>:- to execute the program two major parts of the memory used are stack and heap. Stack frames area created in the stack for functions and in the heap for dynamic memory allocation. The stack and heap are un-initialized areas. Therefore whatever happens to be in the memory becomes the initial (garbage) value for the objects created in that space.</p>
<p>The local variable and function arguments are allocated in the stack. For the local variables that have an initialization value, code is generated by the compiler to initialize them explicitly to those values when the stack frames are created. For function parameters the compiler generates code to copy the actual arguments to the space allocated for the parameters in the stack frame.</p>
<p>Here, we will take a small program and see where different program elements are stored when that program executes. The comments explain where the variables get stored.</p>
<p>int bss1;<br />
static double bss2;<br />
char *bss3;<br />
// these are stored in initialized to zero segment also known as un-initialized data segment(BSS)<br />
int init1=0;<br />
float init2=10.0f<br />
char *init3=”hello world”;<br />
// these are stored in initialized data segment<br />
// the code for main function gets stored in the code segment<br />
int main<br />
{<br />
int local1=10; // this variable is stored in the stack and initialization code is generated by compiler.<br />
int local2; //this variable is not initialized hence it has garbage value. It does not get initialized to zero.<br />
static int local3; // this is allocated in the BSS segment and gets initialized to zero<br />
static int local4=100; //this gets allocated in initialed data segment<br />
int (*local-foo) (const char* &#8212;)= printf; // printf is in a shared library (libc or c runtime library)<br />
// load-foo is a local variable(function pointer) that points to the printf function local-foo(“hello world”); this function call results in the creation of stack frame in stack area<br />
int *loacl5=malloc(sizeof(int));<br />
// allocated in stack however it points to dynamically allocated block in heap.<br />
return 0;<br />
// stack frame for the main function gets destroyed after executing main<br />
}</p>
<p>There several tools to check where a variable gets stored in the memory. But the easy to use tool is nm.</p>
<blockquote><p><strong>Using nm tool</strong></p>
<p>Gcc program name<br />
nm ./a.out </p></blockquote>
<p>if no arguments are given to nm, it assumes that it should take the input as a.out and we will get some cryptic output like below.</p>
<p><img src="http://nandu310.files.wordpress.com/2009/11/nmall1.png?w=450&#038;h=739" alt="nmall" title="nmall" width="450" height="739" class="alignleft size-full wp-image-124" /></p>
<p>Where the symbols that we did not type are come from? They have been inserted behind the screen by compiler for various reasons. We can ignore them for now.</p>
<p>Now what are those strange numbers, followed by letters (b, B, t). The numbers are the symbol values followed by the symbol type (displayed as a letter) and the symbol name.</p>
<p>The symbol type requires more explanation. A lowercase means it is local variable and uppercase means global (externally available from the file).<br />
B	un-initialized data section (BSS)<br />
D	initialized data section<br />
T	text/code section<br />
U	un identified</p>
<p><strong>Example 1:</strong> nm ./a.out | grep bss</p>
<p><img src="http://nandu310.files.wordpress.com/2009/11/dss.png?w=450&#038;h=131" alt="dss" title="dss" width="450" height="131" class="alignleft size-full wp-image-126" /></p>
<p>Variables bss1, bss3 got allocated in the BSS segment (global) since we put the class as static for variable bss2, it is listed as b (accessible with in the file).</p>
<p><strong>Example 2:</strong> nm ./a.out | grep init</p>
<p><img src="http://nandu310.files.wordpress.com/2009/11/init.png?w=450&#038;h=159" alt="init" title="init" width="450" height="159" class="alignleft size-full wp-image-128" /></p>
<p>These are explicitly initialized and are allocated into initialized data section.</p>
<p><strong>Example 3:</strong> nm ./a.out | grep local</p>
<p><img src="http://nandu310.files.wordpress.com/2009/11/local1.png?w=450&#038;h=93" alt="local" title="local" width="450" height="93" class="alignleft size-full wp-image-130" /></p>
<p>Only local3 and local4 are allocated global memory. Since local3 is un-initialized it is allocated in the BSS and since local 4 is explicitly initialized it is allocated in the initialized data segment. As both are local they are indicated by small letters. Since they are local to the function and to avoid accidental mixing them up with other local variables with the same name they have been suffixed by some numbers. (Compilers differ in their approaches in treating local static variables. This approach is for gcc ).</p>
<p>08048354	T	main<br />
 		U	malloc@@GLIBC_2.0<br />
		U	printf@@ GLIBC_2.0</p>
<p>The main function is allocated in the text/code segment. Obviously we can access this function from outside the file ( to start the execution ). So the type of this symbol is T.</p>
<p>The malloc and printf function used in the program are not defined in the program itself ( header files only declare them, they don’t define them ). They are defined in the shared library GLIBC, version 2.0. that’s what the suffix @@GLIBC_@.0 implies.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=116&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2009/11/09/memory-areas-in-c-language/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/11/cmemory0031.png" medium="image">
			<media:title type="html">cmemory003</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/11/memorylayout.png" medium="image">
			<media:title type="html">Memorylayout</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/11/ccompilerlinker006.png" medium="image">
			<media:title type="html">ccompilerlinker006</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/11/nmall1.png" medium="image">
			<media:title type="html">nmall</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/11/dss.png" medium="image">
			<media:title type="html">dss</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/11/init.png" medium="image">
			<media:title type="html">init</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/11/local1.png" medium="image">
			<media:title type="html">local</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Fedora directly from ISO image</title>
		<link>http://nandu310.wordpress.com/2009/10/30/installing-fedora-directly-from-iso-image/</link>
		<comments>http://nandu310.wordpress.com/2009/10/30/installing-fedora-directly-from-iso-image/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 13:13:31 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=104</guid>
		<description><![CDATA[Let’s assume you have downloaded a new version of a distro and are in the mood to try it out right away. It’s past midnight and you realise that you’ve run out of blank CDs/DVDs. So you will have to wait till the morning when the shops open, to be able to burn the distro [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=104&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Let’s assume you have downloaded a new version of a distro and are in the mood to try it out right away. It’s past midnight and you realise that you’ve run out of blank CDs/DVDs. So you will have to wait till the morning when the shops open, to be able to burn the distro image in order to install it. I’m sure a lot of us often face this problem. In this article I’ll share a simple trick that i came across on web, by which you can install the new distributions without burning it to a CD/DVD. The only requirement is that you should have a pre-installed GNU/Linux system—which you already have, I assume.</p>
<p>All Linux installers use two files to boot a computer: a kernel and an initial root file system—also known as the RAM disk or initrd image. This initrd image contains a set of executables and drivers that are needed to mount the real root file system. When the real root file system mounts, the initrd is unmounted and its memory is freed. These two files are named differently in different distributions—refer to Table 1 for their names.<br />
Table 1: Names of kernel and RAM disk images in some popular distributions<br />
<img src="http://nandu310.files.wordpress.com/2009/10/1231.jpg?w=570" alt="123" title="123" class="aligncenter size-full wp-image-112" /></p>
<p>The first thing you need to do is place the ISO image(s) inside a directory. Some installers are not able to read the ISO images if they are placed inside a directory. So, just to be on the safe side, place them in the root of the file system. The partition on the hard disk holding the ISO files must be formatted with the ext2, ext3 or vfat files system.</p>
<p>In our example, let’s go ahead and do it with an old Fedora 9 ISO image. Follow these steps to begin with:</p>
<p><code># mkdir /fedora<br />
# cp /home/dayanand/Fedora-9-i386-DVD.iso /fedora/fedora9.iso</code></p>
<p>Now extract the kernel and initrd files from the ISO image and place them in the same directory in which you placed the ISO. You can use File Roller, the archive manager for GNOME, to extract the files. Just right click on the ISO and select “Open with File Roller”. It displays the contents of the ISO image. Then navigate to the isolinux directory—in Fedora 9 these two files are placed inside the isolinux directory; it’s often different for other distributions, so please refer to Table 1 for the paths. Select the kernel and initrd files, and extract them to the location where your ISO image exists.</p>
<p>The second method is to mount the ISO image and extract the files. Run the following commands to do this:</p>
<p><code># mount -o loop /fedora/fedora9.iso /media/iso<br />
# cd /media/iso/isolinux<br />
# cp vmlinuz initrd.img /fedora/</code></p>
<p>I have mounted the ISO image without providing the -t iso9660 option (to specify the type of media as an ISO filesystem). It worked for me. If the above mount command doesn’t work, do add this option along with the rest of the mount command above.</p>
<p>Note: Fedora 10 has introduced a change in the Anaconda installer. So, in addition to the vmlinuz and initrd.gz files, you will also need to copy the images/install.img file, create a directory called /fedora/images, and place the install.img file there.</p>
<p>Now, it’s time to edit the /boot/grub/menu.lst file on the system I’m currently using—Ubuntu 8.10. Note that this is the location of the Grub menu in almost all distros, except for Fedora/Red Hat, where it’s called /boot/grub/grub.conf. Append the following entry there:</p>
<p><code>title Install Linux<br />
root (hdX,Y)<br />
kernel /distro/Linux_kernel<br />
initrd /distro/Ram_disk</code></p>
<p>In this case…<br />
<code><br />
1.	‘title’ is the name you want to display in your GRUB menu<br />
2.	‘root’ is the hard disk partition that contains the ISO image<br />
3.	‘kernel’ is the Linux kernel<br />
4.	‘initrd’ is the initial RAM disk image</code></p>
<p>Likewise, the menu.lst entry for the ISO file looks like what’s shown below:</p>
<p><code>title Install Fedora 9<br />
root (hd4,0)<br />
kernel /fedora/vmlinuz<br />
initrd /fedora/initrd.img</code></p>
<p>Now you are ready to install your new Linux distro directly from the hard disk without the need for a CD/DVD drive. Reboot your system and select the ‘Install Fedora 9’ entry from your GRUB menu.<br />
Figure 1 shows what the GRUB menu looks like after rebooting my system.<br />
<img src="http://nandu310.files.wordpress.com/2009/10/install1.jpg?w=300&#038;h=224" alt="install1" title="install1" width="300" height="224" class="alignleft size-medium wp-image-99" /></p>
<p>Obviously, I selected the ‘Install Fedora 9’ entry and it has started booting my system with the help of vmlinuz and initrd.img files. The set-up prompts me to choose a language and keyboard layout. Then it prompts me to select the ‘Installation Method’ as shown in Figure 2.<br />
<img src="http://nandu310.files.wordpress.com/2009/10/install21.jpg?w=300&#038;h=224" alt="install2" title="install2" width="300" height="224" class="alignleft size-medium wp-image-101" /></p>
<p>In this screen you need to select the ‘Hard drive’ option and proceed to the next screen. Here, you have to select the appropriate partition and the directory where the installation image exists. In my system, the installation image exists in the /fedora directory of /dev/sda5 partition. This is shown in Figure 3.<br />
<img src="http://nandu310.files.wordpress.com/2009/10/install3.jpg?w=300&#038;h=224" alt="install3" title="install3" width="300" height="224" class="alignleft size-medium wp-image-102" /></p>
<p>After this, it picks up the Anaconda installer of Fedora 9 (or any other installer, as in your case) from the prescribed location, and proceeds with the regular installation procedure just like you’d get if you were installing from a bootable optical media. Follow the steps as you would to install the distro. Figure 4 shows the package installation in action. After that’s done, reboot and you’ll be able to use your newly installed operating system.<br />
<img src="http://nandu310.files.wordpress.com/2009/10/install4.jpg?w=300&#038;h=224" alt="install4" title="install4" width="300" height="224" class="alignleft size-medium wp-image-103" /><br />
Easy enough, right? So, I hope you’ll start using this simple trick to install the newly released GNU/Linux distros and stop worrying about whether you have the required blank optical media. And the additional environmental benefit is less use of non-biodegradable plastic materials (which is what a CD/DVD is made out of).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=104&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2009/10/30/installing-fedora-directly-from-iso-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/1231.jpg" medium="image">
			<media:title type="html">123</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/install1.jpg?w=300" medium="image">
			<media:title type="html">install1</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/install21.jpg?w=300" medium="image">
			<media:title type="html">install2</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/install3.jpg?w=300" medium="image">
			<media:title type="html">install3</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/install4.jpg?w=300" medium="image">
			<media:title type="html">install4</media:title>
		</media:content>
	</item>
		<item>
		<title>What was MySql root Password!!!!</title>
		<link>http://nandu310.wordpress.com/2009/10/25/what-was-mysql-root-password/</link>
		<comments>http://nandu310.wordpress.com/2009/10/25/what-was-mysql-root-password/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 06:08:27 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=89</guid>
		<description><![CDATA[Many people use the MySQL open source relational database server in web development and educational institutions. One problem that many ran into with my MySQL is forgetting the root password? If this happens we are nothing but locked out of our database server and can’t database server. In such situations knowing how to regain root [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=89&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Many people use the MySQL open source relational database server in web development and educational <img src="http://nandu310.files.wordpress.com/2009/10/forgot-password.jpg?w=239&#038;h=300" alt="forgot-password" title="forgot-password" width="239" height="300" class="alignleft size-medium wp-image-95" />institutions. One problem that many ran into with my MySQL is forgetting the root password? If this happens we are nothing but locked out of our database server and can’t database server. In such situations knowing how to regain root access to your database server comes in handy. With a quick survey of the internet, I found this very simple and very useful information about how-to Recover lost MySQL root password. It is very well written and easy to follow. Here’s what you can do to reset the password for the root user in MySQL on both Windows and Linux. Restart your MySQL server in and tell it to skip the grants table. The detailed description is given below.</p>
<p><strong>Windows Users:</strong></p>
<p><em>For mysql servers below 5.0 version</em></p>
<p>1. Stop your MySQL server completely. This can be done by accessing the Services window inside Windows XP and Windows Server 2003, where you can stop the MySQL service. </p>
<p>2. Open your MS-DOS command prompt using &#8220;cmd&#8221; inside the Run window. Inside it navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command. </p>
<p>3. Execute the following command in the command prompt: mysqld.exe -u root &#8211;skip-grant-tables </p>
<p>4. Leave the current MS-DOS command prompt as it is, and open a new MS-DOS command prompt window. </p>
<p>5. Navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command. </p>
<p>6. Enter &#8220;mysql&#8221; and press enter. </p>
<p>7. You should now have the MySQL command prompt working. Type &#8220;use mysql;&#8221; so that we switch to the &#8220;mysql&#8221; database. </p>
<p>8. Execute the following command to update the password: </p>
<p>UPDATE user SET Password = PASSWORD(&#8216;NEW_PASSWORD&#8217;) WHERE User = &#8216;root&#8217;; </p>
<p>However, you can now run any SQL command that you wish. </p>
<p>After you are finished close the first command prompt and type &#8220;exit;&#8221; in the second command prompt windows to disconnect successfully. You can now start the MySQL service.</p>
<p><em>For mysql servers above 5.0</em></p>
<p>Log on to your server as the Administrator. Kill the MySQL server if it’s running. To do this you need the Windows Services Manager, so click on the Start Menu, then go to the Control Panel, then to the Administrative Tools, and select Services. Here look for the MySQL server and stop it. If it’s not listed there and MySQL is still running it means that MySQL is not running as a service. In that case you need to load the Task Manager which you should be able to access using the key combination of Ctrl+Alt+Del. Now kill the MySQL process.</p>
<p>With the MySQL process stopped you need to force a change of passwords on MySQL using a combination of the UPDATE and FLUSH options. So launch your favorite text editor and create a new file. Enter the following text into the file replacing “NewMySQLPassword” with your new password:</p>
<blockquote><p>UPDATE mysql.user SET Password=PASSWORD(”NewMySQLPassword”) WHERE User=’root’;<br />
FLUSH PRIVILEGES;</p></blockquote>
<p>What the first line does is that it updates the value of the field “Password” in the table mysql.user for the user “root” to “NewMySQLPassword”. The second line flushes the old set of privileges and makes sure your new password is used everywhere. Save this text as C:\mysql_reset.txt.</p>
<p>Next, you need to start your MySQL server passing this file as a configuration parameter. Launch a terminal by going to the Start Menu, then to Run, and then type cmd and hit Enter. Now enter the following command:</p>
<blockquote><p>C:\mysql\bin\mysqld-nt &#8211;init-file=C:\mysql_reset.txt</p></blockquote>
<p>Once the server is done starting, delete the file C:\mysql_reset.txt. Your MySQL root password should be reset now. Now restart your MySQL server. Go back to the Windows Services Manager again to do that. Your new MySQL root password should work for you now.</p>
<p><strong>Linux Users:</strong></p>
<p>Log on to your Linux machine as the root user. The steps involved in resetting the MySQL root password are to stop the MySQL server, restart it without the permissions active so you can log into MySQL as root without a password, set a new password, and then restart it normally. Here’s how you do it. First, stop the MySQL server:</p>
<p><em># /etc/init.d/mysql stop</em></p>
<p>Now start the MySQL server using the &#8211;skip-grant-tables option, which will run the server without loading the permissions settings:</p>
<p><em># mysqld_safe &#8211;skip-grant-tables &amp;</em></p>
<p>The &amp; option at the end makes the command you have executed run as a background process. Now log on to your MySQL server as root:</p>
<p><em># mysql -u root</em></p>
<p>It should allow you in without prompting for a password. The following steps will set the new password:</p>
<blockquote><p>mysql&gt; use mysql;<br />
mysql&gt; update user set password=PASSWORD(”NewMySQLPassword”) where User=’root’;<br />
mysql&gt; flush privileges;<br />
mysql&gt; quit</p></blockquote>
<p>Replace “NewMySQLPassword” with your own password. Here’s what happens here. The first line selects the MySQL configuration tables. The second line updates the value of the field “Password” for the user “root” to “NewMySQLPassword”. The third line flushes the old set of privileges and makes sure your new password is used everywhere. Now, the last step is to restart the server normally and use your new root password to log in:</p>
<blockquote><p># /etc/init.d/mysql stop<br />
# /etc/init.d/mysql start<br />
# mysql -u root -pNewMySQLPassword</p></blockquote>
<p>Congratulations, your new MySQL root password is set and your MySQL server is ready to be used again. Remember to update all your applications to use this password if you are using it anywhere.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=89&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2009/10/25/what-was-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/forgot-password.jpg?w=239" medium="image">
			<media:title type="html">forgot-password</media:title>
		</media:content>
	</item>
		<item>
		<title>Demystifying the Integer overflow in C language</title>
		<link>http://nandu310.wordpress.com/2009/10/20/demystifying-the-integer-overflow-in-c-language/</link>
		<comments>http://nandu310.wordpress.com/2009/10/20/demystifying-the-integer-overflow-in-c-language/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 04:09:58 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=82</guid>
		<description><![CDATA[What is integer overflow and why it occurs? An integer overflow, or integer wrapping, is a potential problem in a program based upon the fact that the value that can be held in a numeric data type is limited by the data type&#8217;s size in bytes. ANSI C uses the following minimum sizes: data type [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=82&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>What is integer overflow and why it occurs?</strong></p>
<p>An integer overflow, or integer wrapping, is a potential problem in a program based upon the fact that the value that can be held in a numeric data type is limited by the data type&#8217;s size in bytes. ANSI C uses the following minimum sizes:</p>
<p>data type	size (bytes)<br />
char	1<br />
short	2<br />
int	2<br />
long	4</p>
<p>In practice, many compilers use a 4-byte int. It also should be noted that the actual ranges for the data types depend on whether or not they are signed. for instance, a signed 2-byte short may be between -32767 and 32767, while an unsigned short may be between 0 and 65535. See your [include]/limits.h file for specific numbers for your compiler.</p>
<p><strong>Why should you care?</strong></p>
<p>If you try to put a value into a data type that is too small to hold it, the high-order bits are dropped, and only the low-order bits are stored. Another way of saying that is that modulo-arithmetic is performed on the value before storing it to make sure it fits within the data type. Taking our unsigned short example:</p>
<p>Limit:	65535 or 1111 1111 1111 1111<br />
Too big:	65536 or 1 0000 0000 0000 0000<br />
What&#8217;s stored:	0 or 0000 0000 0000 0000</p>
<p>As the above makes evident, that result is because the high-order (or left-most) bit of the value that&#8217;s too big is dropped. Or you could say that what&#8217;s stored is the result of<br />
Stored = value % (limit + 1) or 65536 % (65535 + 1) = 0<br />
In signed data types, the result is a little different and results in some seemingly weird behavior:</p>
<p>Positive limit:	32767 or 0111 1111 1111 1111<br />
Too big:	32768 or 1000 0000 0000 0000<br />
What&#8217;s stored:	-32768</p>
<p><strong>Why&#8217;s that?</strong> </p>
<p>It&#8217;s because of &#8220;2&#8242;s compliment,&#8221; which is how negative numbers are represented in binary. To make a long story short, the first half of the range (0 thru 0111 1111 1111 1111) is used for positive numbers in order of least to greatest. The second half of the range is then used for negative numbers in order of least to greatest. So, the negative range for a signed 2-byte short is -32768 thru -1, in that order.</p>
<p><strong>When it occurs?</strong></p>
<p>Integer overflow happens because computers use fixed width to represent integers. So which are the operations that result in overflow? Bitwise and logical operations cannot overflow, while cast and arithmetic operations can. For example, ++ and += operators can overflow, whereas &amp;&amp; or &amp; operators (or even &lt;&gt; operators) cannot. </p>
<p>Regarding arithmetic operators, it is obvious that operations like addition, subtraction and multiplication can overflow. How about operations like (unary) negation, division and mod (remainder)? For unary negation, -MIN_INT is equal to MIN_INT (and not MAX_INT), so it overflows. Following the same logic, division overflows for the expression (MIN_INT / -1). How about a mod operation? It does not overflow. The only possible overflow case (MIN_INT % -1) is equal to 0 (verify this yourself—the formula for % operator is a % b = a &#8211; ((a / b) * b)).</p>
<p><strong>What happens when it occur?</strong></p>
<p>Suppose memory is being allocated based on an unsigned integer data type&#8217;s value. If that value has wrapped around, it may be that far too little memory will be made available. Or if a comparison is being made between a signed integer value and some other number, assuming that the former should be less than the latter, if that value has over flown into the negative, the comparison would pass. But are things going to behave the way the programmer intended? Probably not.</p>
<p>Sorting and searching techniques are most important for the programmer and we will use it in most of the programs we write. Among them the most widely used are binary search and quick sort for efficiency. In these algorithms we use mean of two elements. If the elements are integers then the mean is prone to be integer overflow condition. This results in undesirable results or bugs. So, let’s look at some techniques to detect an overflow before it occurs. </p>
<p>For the statement int k = (i + j);<br />
•	If i and j are of different signs, it cannot overflow.<br />
•	If i and j are of same signs (- or +), it can overflow.<br />
•	If i and j are positive integers, then their sign bit is zero. If k is negative, it means its sign bit is 1—it indicates the value of (i + j) is too large to represent in k, so it overflows.<br />
•	If i and j are negative integers, then their sign bit is one. If k is positive, it means its sign bit is 0—it indicates that the value of (i + j) is too small to represent in k, so it overflows.</p>
<p><strong>How to check for the overflow?</strong></p>
<p>To check for overflow, we have to provide checks for conditions 3 and 4. Here is the straightforward conversion of these two statements into code. The function isSafeToAdd(), returns true or false, after checking for overflow.</p>
<p>/* Is it safe to add i and j without overflow? Return value 1 indicates there is no overflow; else it is overflow and not safe to add i and j */<br />
int isSafeToAdd(int i, int j)<br />
{<br />
	if( (i &lt; 0 &amp;&amp; j =0) || (i &gt; 0 &amp;&amp; j &gt; 0) &amp;&amp; k  INT_MAX) or if ((i + j)   INT_MAX) || ((i + j)  INT_MAX), we can check the condition (i &gt; INT_MAX &#8211; j) by moving j to the RHS of the expression. So, the condition in isSafeToAdd can be rewritten as:</p>
<p>if( (i &gt; INT_MAX &#8211; j) || (i &lt; INT_MIN &#8211; j) )<br />
return 0;</p>
<p>That works! But can we simplify it further? From condition 2, we know that for an overflow to occur, the signs of i and j should be the same. If you notice the conditions in 3 and 4, the sign bit of the result (k) is different from (i and j). Does this strike you as the check that the ^ operator can be used? How about this check:</p>
<p>int k = (i + j);<br />
if( ((i ^ k) &amp; (j ^ k)) &lt; 0)<br />
return 0;</p>
<p>Let us check it. Assume that i and j are positive values and when it overflows, the result k will be negative. Now the condition (i ^ k) will be a negative value—the sign bit of i is 0 and the sign bit of k is 1; so ^ of the sign bit will be 1 and hence the value of the expression (i ^ k) is negative. So is the case for (j ^ k) and when the &amp; of two values is negative; hence, the condition check with &lt; 0 becomes true when there is overflow. When i and j are negative and k is positive, the condition again is &lt; 0 (following the same logic described above).</p>
<p>So, yes, this also works! Though the if condition is not very easy to understand, it is correct and is also an efficient solution!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=82&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2009/10/20/demystifying-the-integer-overflow-in-c-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>
	</item>
		<item>
		<title>Some of the puzzling things about C Language</title>
		<link>http://nandu310.wordpress.com/2009/10/20/some-of-the-puzzling-things-about-c-language/</link>
		<comments>http://nandu310.wordpress.com/2009/10/20/some-of-the-puzzling-things-about-c-language/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 02:42:25 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=78</guid>
		<description><![CDATA[Can you guess why there is no distinct format specifier for ‘double’ in the printf/scanf format string, although it is one of the four basic data types? (Remember we use %lf for printing the double value in printf/scanf; %d is for integers). Ans: In older versions of C, there was no ‘double’—it was just ‘long [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=78&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Can you guess why there is no distinct format specifier for ‘double’ in the <code>printf</code>/<code>scanf</code> format string, although it is one of the four basic data types? (Remember we use <code>%lf</code> for printing the double value in <code>printf</code>/<code>scanf</code>; <code>%d</code> is for integers).</strong></p>
<p><strong>Ans: </strong>In older versions of C, there was no ‘double’—it was just ‘long float’ type—and that is the reason why it has the format specifier ‘<code>%lf</code>’ (‘<code>%d</code>’ was already in use to indicate signed decimal values). Later, double type was added to indicate that the floating point type might be of ‘double precision’ (IEEE format, 64-bit value). So a format specifier for long float and double was kept the same.</p>
<p><strong>Why is the output file of the C compiler called <code>a.out</code>?</strong></p>
<p><strong>Ans: </strong>The <code>a.out</code> stands for ‘assembler.output’ file [2]. The original UNIX was written using an assembler for the PDP-7 machine. The output of the assembler was a fixed file name, which was <code>a.out</code> to indicate that it was the output file from the assembler. No assembly needs to be done in modern compilers; instead, linking and loading of object files is done. However, this tradition continues and the output of <code>cc</code> is by default <code>a.out</code>!</p>
<p><strong>what is the use of volatile keyword in c?</strong></p>
<p>The meaning of volatile is a popular interview question, particularly for freshers and I’ve read articles describing the properties of this keyword as if it had super powers.</p>
<p>The volatile keyword does a very simple job. When a variable is marked as volatile, the programmer is instructing the compiler not to cache this variable in a register but instead to read the value of the variable from memory each and every time the variable is used. That’s it – simple isn’t it?</p>
<p>To illustrate the use of the keyword, consider the following example:</p>
<p><code>volatile int* vp = SOME_REGISTER_ADDRESS;<br />
for(int i=0; i&lt;100; i++)<br />
    foo(*vp);</code><br />
In this simple example, the pointer vp points to a volatile int. The value of this int is read from memory for each loop iteration. If volatile was not specified then it is likely that the compiler would generate optimized code which would read the value of the int once, temporarily store this in a register and then use the register copy during each iteration.</p>
<p>hope after reading this you reply confidently, when the same question is asked to you in the interview.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=78&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2009/10/20/some-of-the-puzzling-things-about-c-language/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>
	</item>
		<item>
		<title>Dowry!!! A deplorable practice!!!</title>
		<link>http://nandu310.wordpress.com/2009/10/19/dowry-a-deplorable-practice/</link>
		<comments>http://nandu310.wordpress.com/2009/10/19/dowry-a-deplorable-practice/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 11:38:02 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=57</guid>
		<description><![CDATA[The other day I happened to meet my child hood friend Prakash, who got married to one of our school mates and cousin Pranathi. Yesterday he came to his father in-law and my maternal uncle. So, I happened to chat with him as to what was the need to make any dowry from his in-laws, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=57&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The other day I happened to meet my child hood friend Prakash, who got married to one of our school mates and cousin Pranathi. Yesterday he came to his father in-law and my maternal uncle. So, I happened to chat with him as to what was the need to make any dowry from his in-laws, when he himself earned a handsome salary working with an MNC at a prestigious position? Excerpts of my chat with him,</p>
<p><strong>Me</strong>: hi Prakash! How r u? Good to see you here</p>
<p><strong>Prakash:</strong> I am fine raa!! It’s been a long time since we met each other</p>
<p><strong>Me:</strong> how come you are here?</p>
<p><strong>Prakash:</strong> your uncle wanted to meet Pranathi so we came here</p>
<p><strong>Me</strong>: came to know that you took a handsome amount as dowry to marry my cousin.</p>
<p><strong>Prakash</strong>: hmm!!! Yes!! You know that, my parents had spent a lump sum of money on my education (master’s degree from U.S.A) and are left with little else. So they wanted to stabilize the position by demanding a dowry. Initially I was flabbergasted and opposed it but latter realized that their argument was right.</p>
<p><strong>Me</strong>: you are earning a good amount every month. Don’t you? Is it really required for you to take that much money to stabilize your financial position?</p>
<p><strong>Prakash</strong>: that was just a kind of help/support I demanded from her family to stabilize my financial position. Do you think this is unlawful?</p>
<p>(At this point of time I thought that there is no point in discussing with him).</p>
<p><strong>Me</strong>: I understand your feelings!! Sorry for that question, it was just framed badly, not intended to hurt you.</p>
<p><strong>Prakash</strong>: It’s OK.</p>
<p><strong>Me</strong>: ok Prakash I have to meet grandmother too. We will meet again?</p>
<p><strong>Prakash</strong>: ok nandu bye.</p>
<div id="attachment_64" class="wp-caption alignleft" style="width: 220px"><img class="size-medium wp-image-64  " title="dowry1" src="http://nandu310.files.wordpress.com/2009/10/dowry_large521.gif?w=210&#038;h=164" alt="dowry1" width="210" height="164" /><p class="wp-caption-text">dowry1</p></div>
<p>Dowry? A sensational word, isn’t it? In India, giving of the dowry by bride&#8217;s people to bride groom is continuing for decades. The dowry amount and marriage expenses vary from community to community. It forces the bride’s family to get into a debt trap as the demand for dowry exceeds their financial capabilities (especially in the case of middle income group). Failure to provide a customary, or agreed-upon, dowry could call off a marriage. They beg, borrow and honor the commitments. The dowry amount insisted upon based on the qualification, designation, earning potential, affluence of the parents of the bridegroom etc… Sometimes it may run into millions of rupees. Its shame that education, position and status are used as an extra catalyst for demanding</p>
<div id="attachment_66" class="wp-caption alignleft" style="width: 239px"><img class="size-medium wp-image-66 " title="A serious problem" src="http://nandu310.files.wordpress.com/2009/10/dowryw.jpg?w=229&#038;h=240" alt="A serious problem" width="229" height="240" /><p class="wp-caption-text">A serious problem</p></div>
<p>HUGE DOWRY!</p>
<div id="attachment_59" class="wp-caption alignleft" style="width: 233px"><img class="size-medium wp-image-59   " title="Dowry" src="http://nandu310.files.wordpress.com/2009/10/dowry.jpg?w=223&#038;h=240" alt="Dowry" width="223" height="240" /><p class="wp-caption-text">Dowry</p></div>
<p>I also blame the girl’s parents for paying Dowry! They all want their daughter to be more secure financially so they always tell boy’s parents that we will give you good dowry if you accept the alliance of our daughter with your boy.</p>
<p>I have friend named Ravindra, a software engineer with a high paid salary.,I know him from my childhood.  He said that he don’t need dowry during process of his alliance, the relatives of the girls family told her parents that there should be some problem in boy that’s why they are not asking for dowry, and the alliance was broken. But right now he is married and living happily. So it’s not only boy’s fault or boys family, brides parent are also involved in that. What if you can afford, you are supporting an ill-cause in the society. And if you cannot afford you go to the extent of taking LOAN and paying the dowry. Is it really desirable?</p>
<p>I don’t think the dowry would be necessary for my marriage (if I were to ever walk down the aisle). What about you? Can’t you say NO! Don’t you feel that this money is <strong>not your MONEY!</strong> And remember guys, this money will never bring joy in your life; if you say yes to dowry you are indirectly welcoming misfortune into your life because it has tears of the parents of the girl.</p>
<p><strong>so guys think a while before asking for or giving dowry!!!</strong>!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=57&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2009/10/19/dowry-a-deplorable-practice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/dowry_large521.gif?w=300" medium="image">
			<media:title type="html">dowry1</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/dowryw.jpg?w=286" medium="image">
			<media:title type="html">A serious problem</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/dowry.jpg?w=279" medium="image">
			<media:title type="html">Dowry</media:title>
		</media:content>
	</item>
		<item>
		<title>Congregation of MSIT IIIT 09</title>
		<link>http://nandu310.wordpress.com/2009/10/13/congregation-of-msit-iiit-09/</link>
		<comments>http://nandu310.wordpress.com/2009/10/13/congregation-of-msit-iiit-09/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 03:40:43 +0000</pubDate>
		<dc:creator>nandu310</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nandu310.wordpress.com/?p=25</guid>
		<description><![CDATA[My B.Tech College principal used to say Convocation is not only a great moment in the life a young person, but also in the life of the University. On 2009, August 15th when whole India was celebrating independence day, we were busy registering our names for the convocation and we had convocation rehearsal in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=25&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My B.Tech College principal used to say Convocation is not only a great moment in the life a young person, but also in the life of the University. On 2009, August 15<sup>th </sup>when whole India was celebrating independence day, we were busy registering our names for the convocation and we had convocation rehearsal in the evening, day before the actual event.</p>
<div id="attachment_27" class="wp-caption alignleft" style="width: 220px"><img class="size-medium wp-image-27" title="receiving a degree" src="http://nandu310.files.wordpress.com/2009/10/img_0052.jpg?w=210&#038;h=140" alt="IMG_0052" width="210" height="140" /><p class="wp-caption-text">receiving a degree</p></div>
<p>This time the dress code for convocation had changed from the traditional one to Kurta Pajamas. May be that was one of the steps taken by IIIT professors to encourage our traditional Indian dress code. I, like others was feeling a bit disappointed as we all had dreamt about throwing hats in air. But that disappointment vanished within minutes. Because, our ever enthusiast, Sai Ram came up with an idea of getting the convocation gowns and hats exclusively for us and the other important thing was all the friends were together.</p>
<div id="attachment_30" class="wp-caption alignright" style="width: 220px"><img class="size-medium wp-image-30 " title="After breakfast" src="http://nandu310.files.wordpress.com/2009/10/dsc042021.jpg?w=210&#038;h=158" alt="After breakfast" width="210" height="158" /><p class="wp-caption-text">After breakfast</p></div>
<p>In the morning breakfast was arranged for all the students along with their parents. Then we had the degree distribution ceremony where we were given our certificates. Within an hour some 400 students had taken the traditional walk across the platform to receive the certificate and handshake from Dr. Raj Reddy, Professor, CMU. The certificate which cost us 2 years and  a few lacs. I don’t know whether it’s worth putting that much investment to get that certificate. I had become a M.S officially. We all had a great photo session with all the permutation and combination possible among classmates.</p>
<div id="attachment_34" class="wp-caption alignleft" style="width: 220px"><img class="size-medium wp-image-34  " title="With two strong fellows of MSIT 09" src="http://nandu310.files.wordpress.com/2009/10/dsc00732.jpg?w=210&#038;h=118" alt="With two strong fellows of MSIT 09" width="210" height="118" /><p class="wp-caption-text">With two strong fellows of MSIT 09</p></div>
<p>Then after a gap the second session of event was started in which had speech by chief guest Dr. Kasturirangan, former head of ISRO. I was busy in the photo session, so could not listen to speech properly.  Parents of students were also</p>
<div id="attachment_35" class="wp-caption alignleft" style="width: 220px"><img class="size-medium wp-image-35 " title="Begining of Photo Session" src="http://nandu310.files.wordpress.com/2009/10/dsc006772.jpg?w=210&#038;h=118" alt="Begining of Photo Session" width="210" height="118" /><p class="wp-caption-text">Begining of Photo Session</p></div>
<div id="attachment_37" class="wp-caption alignleft" style="width: 220px"><img class="size-medium wp-image-37  " title="Last photo of the day" src="http://nandu310.files.wordpress.com/2009/10/img_02062.jpg?w=210&#038;h=140" alt="Last photo of the day" width="210" height="140" /><p class="wp-caption-text">Last photo of the day</p></div>
<p>asked to stand to acknowledge the effort they had put for their children. The event was over and we were back to what we are expert in. The chat sessions and games had started again. I am still not sure whether this Master in my degree stands for Master of Science in Computer science or Master of Science in Communication Science.</p>
<p>Even more, though, I wanted to use this space to congratulate our class of MSIT 2009. Congratulations!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nandu310.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nandu310.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nandu310.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nandu310.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nandu310.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nandu310.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nandu310.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nandu310.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nandu310.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nandu310.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nandu310.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nandu310.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nandu310.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nandu310.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nandu310.wordpress.com&amp;blog=6602584&amp;post=25&amp;subd=nandu310&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nandu310.wordpress.com/2009/10/13/congregation-of-msit-iiit-09/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0183326ce9ac08e99df472f9c6a5bfec?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nandu310</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/img_0052.jpg?w=300" medium="image">
			<media:title type="html">receiving a degree</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/dsc042021.jpg?w=300" medium="image">
			<media:title type="html">After breakfast</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/dsc00732.jpg?w=300" medium="image">
			<media:title type="html">With two strong fellows of MSIT 09</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/dsc006772.jpg?w=300" medium="image">
			<media:title type="html">Begining of Photo Session</media:title>
		</media:content>

		<media:content url="http://nandu310.files.wordpress.com/2009/10/img_02062.jpg?w=300" medium="image">
			<media:title type="html">Last photo of the day</media:title>
		</media:content>
	</item>
	</channel>
</rss>
