<?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; gurpal.singh</title>
	<atom:link href="https://www.emblogic.com/blog/author/gurpal-singh/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>Shell ,Terminal and Console</title>
		<link>https://www.emblogic.com/blog/04/shell-terminal-and-console/</link>
		<comments>https://www.emblogic.com/blog/04/shell-terminal-and-console/#comments</comments>
		<pubDate>Tue, 15 Apr 2014 19:29:59 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9814</guid>
		<description><![CDATA[SHELL :-&#62; &#8220;Shell&#8221; is the term used for any program which runs others. It wraps around another program .As the name suggest &#8220;Shell&#8221; the outer covering .for example in windows(OS) windows explorer is shell.In unix circles, shell has specialized to &#8230; <a href="https://www.emblogic.com/blog/04/shell-terminal-and-console/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>SHELL :-&gt;</p>
<p>&#8220;Shell&#8221; is the term used for any program which runs others. It wraps around another program .As the name suggest &#8220;Shell&#8221; the outer covering .for example in windows(OS) windows explorer is shell.In unix circles, shell has specialized to mean a command-line shell, centered around entering the name of the application one wants to start, followed by the names of files or other objects that the application should act on, and pressing the Enter key. launching programs in the background and managing them is mostly performed by the shell.</p>
<p>TERMINAL :- )</p>
<p>The word terminal can also have a more traditional meaning of a device through which one interacts with a computer, typically with a keyboard and display. In General ,we can say that end point communication with the usera special-purpose computer whose only purpose is to drive a keyboard, display, mouse and occasionally other human interaction peripherals, with the actual applications running on another, more powerful computer.</p>
<p>CONSOLE : &#8211; )</p>
<p>The <strong>console</strong> is a special sort of <em>terminal</em>. Historically, the console was a single keyboard and monitor plugged into a dedicated serial console port on a computer used for direct communication at a low level with the operating system. Modern linux systems provide <em>virtual consoles</em>. These are accessed through key combinations (e.g. <kbd>Alt</kbd>+<kbd>F1</kbd> or <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>F1</kbd>; the function keys  numbers different consoles) which are handled at low levels of the linux operating system &#8212; this means that there is no special service which needs to be installed and configured to run. Interacting with the console is also done using a <em>shell</em> program.</p>
<p>note:</p>
<p>1)Input:the terminal converts keys into control sequences (e.g. <kbd>Left</kbd> ? <code>\e[D</code>). The shell converts control sequences into commands (e.g. <code>\e[D</code> ? <code>backward-char</code>).</p>
<p>2)Line edition, input history and completion are provided by the shell. The terminal may provide its own line edition, history and completion instead, and only send a line to the shell when it&#8217;s ready to be executed.</p>
<p>3Output: the shell emits instructions such as “display <code>foo</code>”, “switch the foreground color to green”, “move the cursor to the next line”, etc. The terminal acts on these instructions.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/shell-terminal-and-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PARALLEL PORT</title>
		<link>https://www.emblogic.com/blog/03/parallel-port-8/</link>
		<comments>https://www.emblogic.com/blog/03/parallel-port-8/#comments</comments>
		<pubDate>Mon, 03 Mar 2014 07:24:39 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8810</guid>
		<description><![CDATA[what is parallel port? A connector for a device  that send and recieve several bits of data simultaneously. three modes for parallel communication:- 1)compatible mode   2)nibble mode    3)byte mode 1) personal computers today are equipped with a parallel &#8230; <a href="https://www.emblogic.com/blog/03/parallel-port-8/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>what is parallel port?<br />
A connector for a device  that send and recieve several bits of data simultaneously.</p>
<p style="text-align: left">three modes for parallel communication:-</p>
<p>1)compatible mode   2)nibble mode    3)byte mode<br />
1) personal computers today are equipped with a parallel port Because the parallel port is a perfect choice for connection to other peripheral devices.<br />
to transfer data parallely.<br />
2) communication to parallel ports limited beacause it is unidirectional and no standard for interface.<br />
3) In 1994,the new parallelport standard devloped by IEEE is 1284 standard.<br />
4) this standard based on centronic standard parallel port(SPP).<br />
5)standard parallel port is known as centronic paralel port.<br />
6) in centronic mode ,it is unidirectional which means from host to peripherals.for example&#8212;printer.<br />
7)1284 standard compatible with EPP and ECP.<br />
8) 1284 standard provide improved performance while retaining backward compatibility.</p>
<p>9)In nibble and byte mode data can be transfered in reverse direction.<br />
&gt;why there is a need of communication in reverse dirction?<br />
As the technology grows its strands with time ,we have scanner from which we scan the documents.</p>
<p>For bidirectional communication ,firstly,we have option at boot time and second by setting control register 5th bit set for input and zero for output.<br />
what is handshaking?<br />
i) reciever busy&#8217;s output tells the sender when it&#8217;s ready to recieve data.<br />
ii)sender&#8217;s strobe output tells the reciever that a byte is available to read on data lines.<br />
iii)reciever read data and sends acknowledgement that byte is recieved.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/parallel-port-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CHARACTER DRIVER</title>
		<link>https://www.emblogic.com/blog/02/character-driver-23/</link>
		<comments>https://www.emblogic.com/blog/02/character-driver-23/#comments</comments>
		<pubDate>Sat, 22 Feb 2014 11:51:49 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8505</guid>
		<description><![CDATA[The file_operations Structure The file_operations structure is defined in linux/fs.h, and holds pointers to functions defined by the driver that perform various operations on the device. Each field of the structure corresponds to the address of some function defined by &#8230; <a href="https://www.emblogic.com/blog/02/character-driver-23/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h2>The file_operations Structure</h2>
<p>The file_operations structure is defined in linux/fs.h, and holds pointers to functions defined by the driver that perform various operations on the device. Each field of the structure corresponds to the address of some function defined by the driver to handle a requested operation.The file_operations structure is defined in linux/fs.h, and holds pointers to functions defined by the driver that perform various operations on the device. Each field of the structure corresponds to the address of some function defined by the driver to handle a requested operation.The file_operations structure holds the address of the module&#8217;s function that performs that operation</p>
<h2>The file structure</h2>
<p>Each device is represented in the kernel by a file structure, which is defined in <tt>linux/fs.h</tt>. Be aware that a file is a kernel level structure and never appears in a user space program. It&#8217;s not the same thing as a FILE, which is defined by glibc and would never appear in a kernel space function. Also, its name is a bit misleading; it represents an abstract open `file&#8217;, not a file on a disk, which is represented by a structure named inode</p>
<h2>Registering A Device</h2>
<p>The major number tells you which driver handles which device file. The minor number is used only by the driver itself to differentiate which device it&#8217;s operating on, just in case the driver handles more than one device.Adding a driver to your system means registering it with the kernel.</p>
<h2>Unregistering A Device</h2>
<p>We can&#8217;t allow the kernel module to be rmmod&#8217;ed whenever root feels like it. If the device file is opened by a process and then we remove the kernel module, using the file would cause a call to the memory location where the appropriate function (read/write) used to be.If we&#8217;re lucky, no other code was loaded there, and we&#8217;ll get an ugly error message. If we&#8217;re unlucky, another kernel module was loaded into the same location, which means a jump into the middle of another function within the kernel. The results of this would be impossible to predict, but they can&#8217;t be very positive.</p>
<h2>chardev</h2>
<p>The next code sample creates a char driver named <tt>chardev</tt>. You can <tt>cat</tt> its device file (or <tt>open</tt> the file with a program) and the driver will put the number of times the device file has been read from into the file</p>
<h2>Writing Modules for Multiple Kernel Versions</h2>
<p>The system calls, which are the major interface the kernel shows to the processes, generally stay the same across versions. A new system call may be added, but usually the old ones will behave exactly like they used to. This is necessary for backward compatibility &#8212; a new kernel version is not supposed to break regular processes. In most cases, the device files will also remain the same. On the other hand, the internal interfaces within the kernel can and do change between versions.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/character-driver-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KERNEL SYMBOL TABLE</title>
		<link>https://www.emblogic.com/blog/01/kernel-symbol-table/</link>
		<comments>https://www.emblogic.com/blog/01/kernel-symbol-table/#comments</comments>
		<pubDate>Fri, 10 Jan 2014 07:59:22 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8073</guid>
		<description><![CDATA[In programming language, a symbol is either a variable or a function. Or more generally, we can say, a symbol is a name representing an space in the memory, which stores data (variable, for reading and writing) or instructions (function, &#8230; <a href="https://www.emblogic.com/blog/01/kernel-symbol-table/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In programming language, a symbol is either a variable or a function. Or more generally, we can say, a symbol is a name representing an space in the memory, which stores data (variable, for reading and writing) or instructions (function, for executing). To make life easier for cooperation among various kernel function unit, there are thousands of global symbols in Linux kernel.</p>
<p>In general,when we have to use some variable or function outside the scope we use EXTERN or Declare globally similarly in kernal space we use symbol table .Once we EXPORT a module to symbol table it become a part of kerner .On that kernel any user can import that module .<span style="font-size: 16px">The table contains the addresses of global kernel items—functions and variables—that are needed to implement modularized drivers. When a module is loaded, any symbol exported by the module becomes part of the kernel symbol table.</span><span style="font-size: 16px">you can stack new </span><span style="font-size: 16px">modules on top of other modules. Module stacking is implemented in the mainstream </span><span style="font-size: 16px">kernel sources as well.</span></p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/kernel-symbol-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>https://www.emblogic.com/blog/01/8068/</link>
		<comments>https://www.emblogic.com/blog/01/8068/#comments</comments>
		<pubDate>Thu, 09 Jan 2014 11:32:46 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8068</guid>
		<description><![CDATA[head    1.4; access; symbols; locks root:1.4; strict; comment @ * @; 1.4 date    2014.01.09.16.52.25;    author root;    state Exp; branches; next    1.3; 1.3 date    2014.01.06.17.48.18;    author root;    state Exp; branches; next    1.2; 1.2 date    2014.01.06.16.35.38;    author root;    state Exp; branches; next    &#8230; <a href="https://www.emblogic.com/blog/01/8068/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head    1.4;<br />
access;<br />
symbols;<br />
locks<br />
root:1.4; strict;<br />
comment @ * @;</p>
<p>1.4<br />
date    2014.01.09.16.52.25;    author root;    state Exp;<br />
branches;<br />
next    1.3;</p>
<p>1.3<br />
date    2014.01.06.17.48.18;    author root;    state Exp;<br />
branches;<br />
next    1.2;</p>
<p>1.2<br />
date    2014.01.06.16.35.38;    author root;    state Exp;<br />
branches;<br />
next    1.1;</p>
<p>1.1<br />
date    2014.01.06.15.15.50;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@Device Driver registration using alloc_chrdev_region<br />
@</p>
<p>1.4<br />
log<br />
@DRIVER INITIALIZATION FOR NO. OF DEVICES AND IMPORT FUNCTION<br />
@</p>
<p>head    1.4;<br />
access;<br />
symbols;<br />
locks<br />
root:1.4; strict;<br />
comment @ * @;</p>
<p>1.4<br />
date    2014.01.09.16.59.43;    author root;    state Exp;<br />
branches;<br />
next    1.3;</p>
<p>1.3<br />
date    2014.01.06.17.48.18;    author root;    state Exp;<br />
branches;<br />
next    1.2;</p>
<p>1.2<br />
date    2014.01.06.16.35.38;    author root;    state Exp;<br />
branches;<br />
next    1.1;</p>
<p>1.1<br />
date    2014.01.06.15.15.50;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@Device Driver registration using alloc_chrdev_region<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/8068/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ALLOCATION AND DEALLOCATION OF SCULLDEV STRUCTURE IN DRIVERS</title>
		<link>https://www.emblogic.com/blog/01/allocation-and-deallocation-of-sculldev-structure-in-drivers/</link>
		<comments>https://www.emblogic.com/blog/01/allocation-and-deallocation-of-sculldev-structure-in-drivers/#comments</comments>
		<pubDate>Mon, 06 Jan 2014 11:15:24 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8035</guid>
		<description><![CDATA[head    1.2; access; symbols; locks; strict; comment @ * @; 1.2 date    2014.01.06.16.46.49;    author root;    state Exp; branches; next    1.1; 1.1 date    2014.01.06.15.17.49;    author root;    state Exp; branches; next    ; desc @Device driver unregistered using unregister_chrdev_region @ 1.2 log @dealloction &#8230; <a href="https://www.emblogic.com/blog/01/allocation-and-deallocation-of-sculldev-structure-in-drivers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head    1.2;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment @ * @;</p>
<p>1.2<br />
date    2014.01.06.16.46.49;    author root;    state Exp;<br />
branches;<br />
next    1.1;</p>
<p>1.1<br />
date    2014.01.06.15.17.49;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@Device driver unregistered using unregister_chrdev_region<br />
@</p>
<p>1.2<br />
log<br />
@dealloction of memory using KFREE<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/allocation-and-deallocation-of-sculldev-structure-in-drivers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DEVICE DRIVER REGISTRATION/UNREGISTRATION (ALLOC/UNREGISTER)</title>
		<link>https://www.emblogic.com/blog/01/device-driver-registrationunregistration-allocunregister/</link>
		<comments>https://www.emblogic.com/blog/01/device-driver-registrationunregistration-allocunregister/#comments</comments>
		<pubDate>Mon, 06 Jan 2014 09:51:53 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8018</guid>
		<description><![CDATA[INITIALIZATION  LOG FILE head    1.1; access; symbols; locks root:1.1; strict; comment @ * @; 1.1 date    2014.01.06.15.15.50;    author root;    state Exp; branches; next    ; desc @Device Driver registration using alloc_chrdev_region @ 1.1 log @Initial revision @ CLEAN-UP LOG FILE &#8230; <a href="https://www.emblogic.com/blog/01/device-driver-registrationunregistration-allocunregister/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>INITIALIZATION  LOG FILE</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment @ * @;</p>
<p>1.1<br />
date    2014.01.06.15.15.50;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@Device Driver registration using alloc_chrdev_region<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@</p>
<p>CLEAN-UP LOG FILE<br />
head    1.1;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment @ * @;</p>
<p>1.1<br />
date    2014.01.06.15.17.49;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@Device driver unregistered using unregister_chrdev_region<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/device-driver-registrationunregistration-allocunregister/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>socket(client-server)</title>
		<link>https://www.emblogic.com/blog/12/socketclient-server/</link>
		<comments>https://www.emblogic.com/blog/12/socketclient-server/#comments</comments>
		<pubDate>Sun, 29 Dec 2013 10:36:06 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7862</guid>
		<description><![CDATA[head 2.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2013.12.30.11.56.58; author root; state Exp; branches; next ; desc @program is ready @ 1.1 log @Initial revision @ text head ; access; symbols; locks; strict; comment @ * &#8230; <a href="https://www.emblogic.com/blog/12/socketclient-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p> head    2.1;<br />
  access;<br />
  symbols;<br />
  locks; strict;<br />
  comment @ * @;</p>
<p>  1.1<br />
date    2013.12.30.11.56.58;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p> desc<br />
 @program is ready<br />
  @<br />
  1.1<br />
  log<br />
  @Initial revision<br />
  @<br />
  text<br />
head    ;<br />
 access;<br />
  symbols;<br />
  locks; strict;<br />
  comment @ * @;<br />
  desc<br />
  @request client<br />
  @</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/socketclient-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing client server using threads</title>
		<link>https://www.emblogic.com/blog/12/implementing-client-server-using-threads/</link>
		<comments>https://www.emblogic.com/blog/12/implementing-client-server-using-threads/#comments</comments>
		<pubDate>Sat, 28 Dec 2013 12:17:05 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7866</guid>
		<description><![CDATA[requesting client log file- head    ; access; symbols; locks; strict; comment    @ * @; desc @this is requesting client and it is taking result through result fifo created by itself @ server log file: head    ; access; symbols; locks; strict; &#8230; <a href="https://www.emblogic.com/blog/12/implementing-client-server-using-threads/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>requesting client log file-</p>
<p>head    ;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment    @ * @;</p>
<p>desc<br />
@this is requesting client and it is taking result through result fifo created by itself<br />
@</p>
<p>server log file:</p>
<p>head    ;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment    @ * @;</p>
<p>desc<br />
@this is server file and we use fifo with threads<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/implementing-client-server-using-threads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PIPES</title>
		<link>https://www.emblogic.com/blog/12/pipes-2/</link>
		<comments>https://www.emblogic.com/blog/12/pipes-2/#comments</comments>
		<pubDate>Fri, 20 Dec 2013 12:09:59 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7796</guid>
		<description><![CDATA[Piping is a process where the output of one process is made the input of another.In numerous applications there is clearly a need for these processes to communicate with each exchanging data or control information. Pipes can be used in threads and processes. A &#8230; <a href="https://www.emblogic.com/blog/12/pipes-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Piping is a process where the <em>output</em> of one process is made the <em>input</em> of another.In numerous applications there is clearly a need for these processes to communicate with each exchanging data or control information.</p>
<p>Pipes can be used in threads and processes. A new process can be created using the system call fork(). It returns two differnt values to the child and parent. The value 0 is returned to the child (new) process and the PID (Process ID) of the child is returned to the parent process. This is used to distinguish between the two processes. In the program given below, the child process waits for the user input and once an input is entered, it writes into the pipe. And the parent process reads from the pipe.</p>
<p>the pipe() system call was called before the system call fork().the pipe has been set up, two (or more) cooperative processes will be created by a fork and data will be passed using <tt>read()</tt> and <tt>write()</tt>. Pipes opened with <tt>pipe()</tt> should be closed with <tt>close(int fd)</tt>.</p>
<p>note:</p>
<p>1)pipe is always declared before fork.</p>
<p>2)switching is starts just after fork.for example</p>
<p>pid1=fork();<br />
switch(pid1)<br />
{<br />
case 0:&#8212;.</p>
<p>case1:&#8212;.</p>
<p>}</p>
<p>3)if you are not using semaphore there will be some synchrosing error you can remove that using <strong>sleep </strong>and <strong>wait </strong>statements.</p>
<p>4)we can use <strong>sscanf()and sprintf() </strong>for converting string to variable and variable to string respectively.</p>
<p>5)In pipes ,by the use of command line argument(run time argument) for communication between server and client.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/pipes-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MULTIPLE DATA COMPRESSION</title>
		<link>https://www.emblogic.com/blog/12/multiple-data-compression-2/</link>
		<comments>https://www.emblogic.com/blog/12/multiple-data-compression-2/#comments</comments>
		<pubDate>Fri, 06 Dec 2013 11:26:43 +0000</pubDate>
		<dc:creator><![CDATA[gurpal.singh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7632</guid>
		<description><![CDATA[Multiple Data compresion is technique to compress more than 50 percent of the data,by using iteration methods in C language. before compession and decompession there are certain function we have to perform;- MASTER ARRAY Array is the collection of elements &#8230; <a href="https://www.emblogic.com/blog/12/multiple-data-compression-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Multiple Data compresion is technique to compress more than 50 percent of the data,by using iteration methods in C language.</p>
<p>before compession and decompession there are certain function we have to perform;-</p>
<p>MASTER ARRAY</p>
<p>Array is the collection of elements of same data type in continous memory location.here,we create the array of all the characters including space and put them in array which is called as master array.from where we call all the repeated character of main string from there index.</p>
<p>CODELENGTH</p>
<p>Codelength is the no.of bits in which we have to keep the data i.e. a character takes 1 byte and integer take 4 byte for its storage but an integer can represent in 4 bits or 3 bits in how many bits we have to represent data  it is decided by code length .</p>
<p>COMPRESSION</p>
<p>logically in compression ,we compress the data i.e. firstly we put all the data in array as described earlier simultaneously we create index and after making index we call the characters through their index .By using bitwise shift operator we shift the index value  and put it into a character (type casting) using bitwise OR (|) the 2 byte data stored in 1 byte.here 50% compression is done.</p>
<p>ch=ch&lt;&lt;4;<br />
ch2=ch|ch1;</p>
<p>DECOMPRESSION</p>
<p>In decompression ,logically we repeat the reverse process of compression</p>
<p>STEPS TO COMPRESS AND DECOMPRESS.</p>
<p>COMPRESSION<br />
1.) Open the file to be compressed.<br />
2.) Find the distinct characters in the file and store it in an array(master array).<br />
3.) From the master array find the maximum number of bits required to represent each distinct character in compressed file.<br />
4.) Read the file character by character.<br />
5.) Replace each character with the index of the corresponding character in master array.<br />
6.) Manipulate the indexes in the form of 1 byte using shift operations.<br />
7.) Write the manipulated indexes to the compressed file.<br />
8.) Store the master array in other file so that it could be used at the time of decompression.</p>
<p>DECOMPRESSION<br />
1.) Open the compressed file.<br />
2.) Open the file containing master array and store it in array.<br />
3.) Form the master array find out the number of bits used to represent each character.<br />
4.) Read the compressed file character by character.<br />
5.) From this read characters filter out the actual ASCII characters using shift operations and indexes.<br />
6.) Save the filtered out ASCII characters to new file.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/multiple-data-compression-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
