<?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; deepak.kansal</title>
	<atom:link href="https://www.emblogic.com/blog/author/deepak-kansal/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>Memory management unit</title>
		<link>https://www.emblogic.com/blog/03/memory-management-unit/</link>
		<comments>https://www.emblogic.com/blog/03/memory-management-unit/#comments</comments>
		<pubDate>Tue, 25 Mar 2014 17:20:31 +0000</pubDate>
		<dc:creator><![CDATA[deepak.kansal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9432</guid>
		<description><![CDATA[Allocate available memory efficiently to multiple processes Main functions Allocate memory to processes when needed Protect one process’s memory from another Keep track of what memory is used and what is free. Memory Allocation Contiguous Allocation:Each process allocated a single &#8230; <a href="https://www.emblogic.com/blog/03/memory-management-unit/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Allocate available memory efficiently to multiple processes<br />
<strong>Main functions</strong></p>
<ul>
<li>Allocate memory to processes when needed</li>
<li>Protect one process’s memory from another</li>
<li>Keep track of what memory is used and what is free.</li>
</ul>
<p><strong>Memory Allocation</strong></p>
<ul>
<li><strong>Contiguous Allocation:</strong>Each process allocated a single contiguous chunk of memory</li>
</ul>
<p>&nbsp;</p>
<ul>
<li><strong>Non-contiguous Allocation</strong></li>
<li>Parts of a process can be allocated non-</li>
<li>contiguous chunks of memory</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/memory-management-unit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>character driver</title>
		<link>https://www.emblogic.com/blog/03/character-driver-25/</link>
		<comments>https://www.emblogic.com/blog/03/character-driver-25/#comments</comments>
		<pubDate>Mon, 03 Mar 2014 08:10:15 +0000</pubDate>
		<dc:creator><![CDATA[deepak.kansal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8846</guid>
		<description><![CDATA[We develop a character driver because this class is suitable for most simple hardware devices. Char drivers are also easier to understand than block drivers or network drivers.we present code fragments extracted from a real device driver: scull (Simple Character &#8230; <a href="https://www.emblogic.com/blog/03/character-driver-25/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We develop a character driver because this class is suitable for most simple hardware devices. Char drivers are also easier to understand than block drivers or network drivers.we present code fragments extracted from a real device driver: scull (Simple Character Utility for Loading Localities). scull is a char driverthat acts on a memory area as though it were a device.The advantage of scull is that it isn’t hardware dependent. scull just acts on somememory, allocated from the kernel. Anyone can compile and run scull, and scull is portable across the computer architectures on which Linux runs.<strong></strong></p>
<p><strong>The Design of scull</strong></p>
<p>struct scull_dev {<br />
struct scull_qset *data; /* Pointer to first quantum set */<br />
int quantum;<br />
/* the current quantum size */<br />
int qset;<br />
/* the current array size */<br />
unsigned long size;<br />
/* amount of data stored here */<br />
unsigned int access_key; /* used by sculluid and scullpriv */<br />
struct semaphore sem;<br />
/* mutual exclusion semaphore<br />
*/<br />
struct cdev cdev;<br />
/* Char device structure<br />
*/<br />
};<strong></strong></p>
<p>Allocating and Freeing Device Numbers<br />
One of the first things your driver will need to do when setting up a char device is to<br />
obtain one or more device numbers to work with. The necessary function for this<br />
task is register_chrdev_region, which is declared in &lt;linux/fs.h&gt;:<br />
int register_chrdev_region(dev_t first, unsigned int count,<br />
char *name);<br />
Here, first is the beginning device number of the range you would like to allocate.<br />
The minor number portion of first is often 0, but there is no requirement to that<br />
effect. count is the total number of contiguous device numbers you are requesting.<br />
Note that, if count is large, the range you request could spill over to the next major<br />
number; but everything will still work properly as long as the number range you<br />
request is available. Finally, name is the name of the device that should be associated<br />
with this number range; it will appear in /proc/devices and sysfs.<br />
The kernelwill happily allocate a major number for you on the fly, but you must request this allocation by using a different function:<br />
int alloc_chrdev_region(dev_t *dev, unsigned int firstminor,<br />
unsigned int count, char *name);<br />
Regardless of how you allocate your device numbers, you should free them when<br />
they are no longer in use. Device numbers are freed with:<br />
void unregister_chrdev_region(dev_t first, unsigned int count);<br />
File Operations<br />
The scull device driver implements only the most important device methods. Its<br />
file_operations structure is initialized as follows:<br />
struct file_operations scull_fops = {<br />
.owner =<br />
THIS_MODULE,<br />
.llseek =<br />
scull_llseek,<br />
.read =<br />
scull_read,<br />
.write =<br />
scull_write,<br />
.ioctl =<br />
scull_ioctl,<br />
.open =<br />
scull_open,<br />
.release = scull_release,<br />
};</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/character-driver-25/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>question regarding to c???</title>
		<link>https://www.emblogic.com/blog/02/question-regarding-to-c/</link>
		<comments>https://www.emblogic.com/blog/02/question-regarding-to-c/#comments</comments>
		<pubDate>Tue, 25 Feb 2014 15:24:30 +0000</pubDate>
		<dc:creator><![CDATA[deepak.kansal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Dheeraj sir]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8596</guid>
		<description><![CDATA[int main() { int b; char a; a=&#38;b; printf(&#8220;%p&#8221;,a); } output=? and why so???]]></description>
				<content:encoded><![CDATA[<p>int main()<br />
{<br />
int b;<br />
char a;<br />
a=&amp;b;<br />
printf(&#8220;%p&#8221;,a);<br />
}<br />
output=? and why so???</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/question-regarding-to-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>article on c</title>
		<link>https://www.emblogic.com/blog/11/article-on-c-2/</link>
		<comments>https://www.emblogic.com/blog/11/article-on-c-2/#comments</comments>
		<pubDate>Mon, 25 Nov 2013 12:24:17 +0000</pubDate>
		<dc:creator><![CDATA[deepak.kansal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7547</guid>
		<description><![CDATA[PROJECT01(C-PROGRAMMING BASED PROJECT) Project01-c based programming language,basically to articulate concepts regarding “C Programming”.It is basically a middle level language.Being an electronics engineer,it is one of the basic and important language as far as my career is concerned.It mainly comprises the &#8230; <a href="https://www.emblogic.com/blog/11/article-on-c-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>PROJECT01(C-PROGRAMMING BASED PROJECT)</p>
<p>Project01-c based programming language,basically to articulate concepts regarding “C Programming”.It is basically a middle level language.Being an electronics engineer,it is one of the basic and important language as far as my career is concerned.It mainly comprises the information about the following:</p>
<p>1.Basics: declaration of variables,data types,arithmetic operations,operators ,</p>
<p>2.Control statements:(if-else statements,switch statements).</p>
<p>3.Loops: (for loop,do-while loop,while loop).</p>
<p>4.Functions.</p>
<p>5.Pointer</p>
<p>6.Arrays &amp;strings.</p>
<p>With the help this project Pointer, is my favourite topic in “c”,as I used to scare and run away about studying it.But after having the basic knowledge of “C”and dwelling myself on the basics of “c”, but now I’m able to understand  it and tries to implement every program with pointer.This project focus on each and every basic of the c-programming.</p>
<p>Pointer is a variable which holds the address of another variable.</p>
<p>Syntax:</p>
<p>Data type*p;</p>
<p>“*” denotes it’s a pointer.</p>
<p>We can access the address the address of another variable and can manipulate the value of that variable.The base address of any string or array or any variable can be assigned to it.</p>
<p>Ex:</p>
<p>Char *p;</p>
<p>p=”hello”;//the base address of the string is assigned to it</p>
<p>Besides this,I have covered about the following:</p>
<p>1.About  the operators(arithmetic,logical operators).</p>
<p>2.control statements</p>
<ul>
<li>Ø <strong>If-else statements and switch case</strong> : it checks the particular expression and execute the block of statements respectively.</li>
<li>Ø The merit of it is, we can run the application in user defined mode.</li>
<li>Ø In switch case ,particularly provides the number of case and if the user or programmer values match with its case,then it executes its respective case.</li>
</ul>
<p>3.Loop:</p>
<ul>
<li>Ø <strong>For loop : </strong>it basically used,when we know how many times a particular block of statements have to execute.<strong></strong></li>
</ul>
<p><strong>Syntax:</strong>  for(initialization;condition;updation);</p>
<ul>
<li>Ø <strong>While loop: its </strong>known as the entry-controlled loop,means condition must be true to execute the block of statements.<strong></strong></li>
</ul>
<p><strong>Syntax:  while(condition)</strong></p>
<ul>
<li>Ø <strong>Do-while loop: </strong>it’s a exit controlled loop.That is it execute the block of statements for the 1<sup>st</sup> time irrespective of the condition.<strong></strong></li>
</ul>
<p>4. <strong>File IO: </strong>file input output. It is of two types: low level and high level.</p>
<ul>
<li>Ø Low level is ued at Application level.</li>
</ul>
<p>5<strong>. Array</strong>: it’s a collection of elements of same data type which has continous memory location.</p>
<p>6.<strong>link-list: it’s a</strong> linear data structure.</p>
<p>7. Searching and sorting:</p>
<ul>
<li>Ø <strong>Linear search:</strong> it is more complex ,as number of comparison is more.<strong></strong></li>
<li>Ø <strong>Binary search: it has less number of </strong>comparison.<strong></strong></li>
</ul>
<p><strong>7.MDC: </strong>Multiple data compression,which is the main objective of this project. In this storage space for the data is being compressed.</p>
<ul>
<li>Ø It basically eliminate repeated characters and make the array of unique characters.</li>
<li>Ø By which we have the code length,which denotes the number of bits for a character to be stored in the memory.</li>
</ul>
<p>Hence,by this project ,we will be able to compress the data.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;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sp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>PROJECT01(C-PROGRAMMING BASED PROJECT)</p>
<p>Project01-c based programming language,basically to articulate concepts regarding “C Programming”.It is basically a middle level language.Being an electronics engineer,it is one of the basic and important language as far as my career is concerned.It mainly comprises the information about the following:</p>
<p>1.Basics: declaration of variables,data types,arithmetic operations,operators ,</p>
<p>2.Control statements:(if-else statements,switch statements).</p>
<p>3.Loops: (for loop,do-while loop,while loop).</p>
<p>4.Functions.</p>
<p>5.Pointer</p>
<p>6.Arrays &amp;strings.</p>
<p>With the help this project Pointer, is my favourite topic in “c”,as I used to scare and run away about studying it.But after having the basic knowledge of “C”and dwelling myself on the basics of “c”, but now I’m able to understand  it and tries to implement every program with pointer.This project focus on each and every basic of the c-programming.</p>
<p>Pointer is a variable which holds the address of another variable.</p>
<p>Syntax:</p>
<p>Data type*p;</p>
<p>“*” denotes it’s a pointer.</p>
<p>We can access the address the address of another variable and can manipulate the value of that variable.The base address of any string or array or any variable can be assigned to it.</p>
<p>Ex:</p>
<p>Char *p;</p>
<p>p=”hello”;//the base address of the string is assigned to it</p>
<p>Besides this,I have covered about the following:</p>
<p>1.About  the operators(arithmetic,logical operators).</p>
<p>2.control statements</p>
<ul>
<li>Ø <strong>If-else statements and switch case</strong> : it checks the particular expression and execute the block of statements respectively.</li>
<li>Ø The merit of it is, we can run the application in user defined mode.</li>
<li>Ø In switch case ,particularly provides the number of case and if the user or programmer values match with its case,then it executes its respective case.</li>
</ul>
<p>3.Loop:</p>
<ul>
<li>Ø <strong>For loop : </strong>it basically used,when we know how many times a particular block of statements have to execute.<strong></strong></li>
</ul>
<p><strong>Syntax:</strong>  for(initialization;condition;updation);</p>
<ul>
<li>Ø <strong>While loop: its </strong>known as the entry-controlled loop,means condition must be true to execute the block of statements.<strong></strong></li>
</ul>
<p><strong>Syntax:  while(condition)</strong></p>
<ul>
<li>Ø <strong>Do-while loop: </strong>it’s a exit controlled loop.That is it execute the block of statements for the 1<sup>st</sup> time irrespective of the condition.<strong></strong></li>
</ul>
<p>4. <strong>File IO: </strong>file input output. It is of two types: low level and high level.</p>
<ul>
<li>Ø Low level is ued at Application level.</li>
</ul>
<p>5<strong>. Array</strong>: it’s a collection of elements of same data type which has continous memory location.</p>
<p>6.<strong>link-list: it’s a</strong> linear data structure.</p>
<p>7. Searching and sorting:</p>
<ul>
<li>Ø <strong>Linear search:</strong> it is more complex ,as number of comparison is more.<strong></strong></li>
<li>Ø <strong>Binary search: it has less number of </strong>comparison.<strong></strong></li>
</ul>
<p><strong>7.MDC: </strong>Multiple data compression,which is the main objective of this project. In this storage space for the data is being compressed.</p>
<ul>
<li>Ø It basically eliminate repeated characters and make the array of unique characters.</li>
<li>Ø By which we have the code length,which denotes the number of bits for a character to be stored in the memory.</li>
</ul>
<p>Hence,by this project ,we will be able to compress the data.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><sub> </sub></p>
<p><sub> </sub></p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/article-on-c-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
