<?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/"
	>

<channel>
	<title>EmbLogic &#187; sharma.sumit</title>
	<atom:link href="https://www.emblogic.com/blog/author/sharma-sumit/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>boot-up process</title>
		<link>https://www.emblogic.com/blog/02/boot-up-process/</link>
		<comments>https://www.emblogic.com/blog/02/boot-up-process/#comments</comments>
		<pubDate>Sat, 22 Feb 2014 11:59:54 +0000</pubDate>
		<dc:creator><![CDATA[sharma.sumit]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8515</guid>
		<description><![CDATA[                                                                        BOOT- UP PROCESS When &#8230; <a href="https://www.emblogic.com/blog/02/boot-up-process/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>                                                                        BOOT- UP PROCESS</strong></p>
<p>When you switch ON your system within a few seconds a login window appears. Ever wandered how this window appears? What all steps are performed before this window<br />
appears?<br />
The whole process starting from the switching ON the power supply till the time your<br />
computer is ready for you to work on is called bootup process.<br />
It is 6 stage process that includes steps:</p>
<p>step1: BIOS(Basic Input Output System)<br />
it performs some system integrity tests.<br />
It searches for the boot loader in floppy, cd-rom,or hard drive depending on the<br />
priority set by you,.and after finding it loads it and executes it.<br />
This boot loader is called MBR(Master Boot Record) which is in the 1st sector of the<br />
booting device.<br />
So basically BIOS loads and executes MBR boot loader.<br />
Step 2: MBR(Master Boot Record)<br />
It is located in the first sector of booting device in less than 512 bytes. It has 3<br />
components 1. primary boot loader info in 1st 446 bytes 2nd partition table info in<br />
next 64 bytes 3rd MBR validation check in last 2 bytes.<br />
It contain the info of the secondary boot loader i.e. The GRUB or LILO.<br />
So in short MBR loads and executes the GRUB boot loader.<br />
Step 3: GRUB(Grand Unified Bootloader)<br />
it loads the kernel image and initrd images<br />
it is the GRUB that displays the screen asking you to choose the kernel image to load<br />
among the various kernel images you have on your system.<br />
GRUB configuration file is in /boot/grub/grub.conf which contains info about the<br />
kernel and initrd image to load.<br />
Step 4: Kernel<br />
it mounts the root file system as specified in grub.conf.<br />
Kernel then executes the /sbin/init program which is the first program to beexecuted by the kernel so it has a pid of 1.<br />
initrd stands for initial RAM disk.<br />
It is used by kernel as the temporary root file system until kernel is booted and the<br />
real root file system is mounted. It also contains necessary drivers compiled inside,<br />
which helps in access of hard drives partitions and other hardware.<br />
\</p>
<p>Step 5: Init program<br />
this program checks the /etc/inittab file to decide the linux runlevel.<br />
The run levels availabe are<br />
0-halt<br />
1-single user mode<br />
2-multiuser without NFS<br />
3-full multiuser mode<br />
4-unused<br />
5-X11<br />
6-reboot<br />
Step 6:Runlevel Programs<br />
Depending upon the runlevel set the system wilRun level 0- /etc/rc.d/rc0.d/l execute<br />
the programs from one of the directories.Run level 0 – /etc/rc.d/rc0.d/<br />
Run level 1 – /etc/rc.d/rc1.d/<br />
Run level 2 – /etc/rc.d/rc2.d/<br />
Run level 3 – /etc/rc.d/rc3.d/<br />
Run level 4 – /etc/rc.d/rc4.d/<br />
Run level 5 – /etc/rc.d/rc5.d/<br />
Run level 6 – /etc/rc.d/rc6.d/</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/boot-up-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Article on multiple data compression and expansion using iterative technique by sumit sharma(E-34)</title>
		<link>https://www.emblogic.com/blog/11/article-on-multiple-data-compression-and-expansion-using-iterative-technique/</link>
		<comments>https://www.emblogic.com/blog/11/article-on-multiple-data-compression-and-expansion-using-iterative-technique/#comments</comments>
		<pubDate>Mon, 25 Nov 2013 12:07:45 +0000</pubDate>
		<dc:creator><![CDATA[sharma.sumit]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7514</guid>
		<description><![CDATA[MULTIPLE DATA COMPRESSION AND EXPANSION USING ITERATIVE TECHNIQUE Since we know that in almost all embedded devices there is memory constraint. So there should be judicious use of the available memory. So here i am discussing how to compress and &#8230; <a href="https://www.emblogic.com/blog/11/article-on-multiple-data-compression-and-expansion-using-iterative-technique/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p align="JUSTIFY"><span style="font-size: medium">MULTIPLE DATA COMPRESSION AND EXPANSION USING ITERATIVE TECHNIQUE</span></p>
<p align="JUSTIFY"><span style="font-size: small">Since we know that in almost all embedded devices there is memory constraint. So there should be judicious use of the available memory. So here i am discussing how to compress and expand the compressed data using iterative technique and save memory.</span></p>
<p align="JUSTIFY"><span style="font-size: small">Since the size of char is 1 byte so it could be used to represent 256 different characters. But in how many of our files do we actually have 256 different characters . So taking the advantage over this fact we could actually compress our data. </span></p>
<p align="JUSTIFY"><span style="font-size: small">The first step towards compressing data is to create a master array which contains the different characters that exists in our file. So if for example in our 100 character file there are only 15 different characters then master array would be of size 15. Then taking a step further in order to compress data we need to assign an index to each of the member of master array with minimum number of bits required to represent all of the members of the master array. In our case of 15 characters we could represent each member with only with 4bits rather than 8bits which were used earlier.</span></p>
<p align="JUSTIFY"><span style="font-size: small">So after providing each member of the master array with a unique index of 4 bits each we move on to the next step. We then need to access each element of our text file and map that element with the master array and find out its unique index value. The value which we provided is of 4 bits so we could actually combine the index values of two elements and form an compressed byte which actually contains two of characters from the file in the space of 1 character. Thus effective we are saving 50% of our memory.</span></p>
<p align="JUSTIFY"><span style="font-size: small">For example:</span></p>
<p align="JUSTIFY"><span style="font-size: small">Data to compress: helo to linux.</span></p>
<p align="JUSTIFY"><span style="font-size: small">Master array :helo tinux.</span></p>
<p align="JUSTIFY"><span style="font-size: small">So here we need 4 bits to represent each member of masater array.</span></p>
<p align="JUSTIFY"><span style="font-size: small">Elements : unique index</span></p>
<p align="JUSTIFY"><span style="font-size: small">h : 0000</span></p>
<p align="JUSTIFY"><span style="font-size: small">e : 0001</span></p>
<p align="JUSTIFY"><span style="font-size: small">l : 0010</span></p>
<p align="JUSTIFY"><span style="font-size: small">o : 0011</span></p>
<p align="JUSTIFY"><span style="font-size: small"> : 0100</span></p>
<p align="JUSTIFY"><span style="font-size: small">t : 0101</span></p>
<p align="JUSTIFY"><span style="font-size: small">i : 0110</span></p>
<p align="JUSTIFY"><span style="font-size: small">n : 0111</span></p>
<p align="JUSTIFY"><span style="font-size: small">u : 1000</span></p>
<p align="JUSTIFY"><span style="font-size: small">x : 1001</span></p>
<p align="JUSTIFY"><span style="font-size: small">. : 1010</span></p>
<p align="JUSTIFY"><span style="font-size: small">Now while accessing each element of in order to compress it first we access &#8216;h&#8217; it has index of 0000 but in order to represent it in character form we need 8 bits so we access another character &#8216;e&#8217; with index 0001 and combine both 0000 and 0001 in order to form 8 bit character.</span></p>
<p align="JUSTIFY"><span style="font-size: small">Actually it will be implemented like this:</span></p>
<p align="JUSTIFY"><span style="font-size: small">we will assign h with 0 and e with 1 in unsigned char form.</span></p>
<p align="JUSTIFY"><span style="font-size: small">so</span></p>
<p align="JUSTIFY"><span style="font-size: small">h=00000000</span></p>
<p align="JUSTIFY"><span style="font-size: small">e=00000001 </span></p>
<p align="JUSTIFY"><span style="font-size: small">Since we know that only lower 4 bits of h are significant and so are of e ,so we left shift the bits of h by 4(though there is no significance of this step but if it would not have been 0 then it is a must step) and OR both h and e.</span></p>
<p align="JUSTIFY"><span style="font-size: small">We get 00000001 where upper 4 bits represent &#8216;h&#8217; and lower 4 bits represent &#8216;e&#8217;.</span></p>
<p align="JUSTIFY"><span style="font-size: small">For the next two elements :</span></p>
<p align="JUSTIFY"><span style="font-size: small">l : assigned with 3 i.e 00000011</span></p>
<p align="JUSTIFY"><span style="font-size: small">o : assigned with 4 i.e 00000100</span></p>
<p align="JUSTIFY"><span style="font-size: small">On left shifting &#8216;l&#8217; and Oring both we get 00110100</span></p>
<p align="JUSTIFY"><span style="font-size: small">On the left index value of &#8216;l&#8217; that we as assigned and on right index value of &#8216;o&#8217;.</span></p>
<p align="JUSTIFY"><span style="font-size: small">So using this technique we could compress all our data. Now after compressing you actually generated a file that occupies 50% less space than your original file without even losing any of its content.</span></p>
<p align="JUSTIFY"><span style="font-size: small">Now in order to revive back the uncompressed data the process is just the vice-versa. You just have to access each byte of the compressed data and separate out the lower 4 and upper 4 nibbles by masking or shifting , and compare with the indexes of the master array to look out for the character what that nibble meant and save that character in another file in order to create an uncompressed file from your compressed file.</span></p>
<p align="JUSTIFY"><span style="font-size: small">Taking the same example:</span></p>
<p align="JUSTIFY"><span style="font-size: small">For our first byte of the compressed i.e. 00000001</span></p>
<p align="JUSTIFY"><span style="font-size: small">first we AND it with 11110000 to get the upper nibble since we know that upper nibble represents the index of first character and then compare that obtained nibble with the index of the master array and the element with the corresponding index is the first character , save it in another file that represents your uncompressed file .Then for the second character AND that byte from compressed file with 00001111</span></p>
<p align="JUSTIFY"><span style="font-size: small">in order to get the lower nibble since it represented the index of the second character . As done for the first character look for the index in the master array and save that character in the same uncompressed file .</span></p>
<p align="JUSTIFY"><span style="font-size: small">First byte of compressed data :00000001</span></p>
<p align="JUSTIFY"><span style="font-size: small">multiply with 1111000 we get 00000000 i.e 0 which is the index of &#8216;h&#8217; . So we get h as the first character of our expanded file that is same as the original first character.</span></p>
<p align="JUSTIFY"><span style="font-size: small">Similarly </span></p>
<p align="JUSTIFY"><span style="font-size: small">on multiplying with 00001111 we get 00000001 i.e 1 which is the index of &#8216;e&#8217; . So we get e as the second character of our expanded file that is same as the original second character.</span></p>
<p align="JUSTIFY"><span style="font-size: small">So following this procedure we could revive all our original data from the compressed data using the key i.e. The master array which we have created earlier.</span></p>
<p align="JUSTIFY"><span style="font-size: small">In this way we can use our storage device with small storage capability to store large amount of data. </span></p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/article-on-multiple-data-compression-and-expansion-using-iterative-technique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
