<?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; Himalaya Batra</title>
	<atom:link href="https://www.emblogic.com/blog/author/himalaya-batra/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>RTOS</title>
		<link>https://www.emblogic.com/blog/03/rtos/</link>
		<comments>https://www.emblogic.com/blog/03/rtos/#comments</comments>
		<pubDate>Mon, 03 Mar 2014 07:13:42 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8803</guid>
		<description><![CDATA[A Real-Time Operating System (RTOS) is a computing environment that reacts to input within a specific time period. A real-time deadline can be so small that system reaction appears instantaneous. The term real-time computing has also been used, however, to &#8230; <a href="https://www.emblogic.com/blog/03/rtos/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: left">A Real-Time Operating System (RTOS) is a computing environment that reacts to input within a specific time period. A real-time deadline can be so small that system reaction appears instantaneous. The term real-time computing has also been used, however, to describe &#8220;slow real-time&#8221; output that has a longer, but fixed, time limit. Learning the difference between real-time and standard operating systems is as easy as imagining yourself in a computer game. Each of the actions you take in the game is like a program running in that environment. A game that has a real-time operating system for its environment can feel like an extension of your body because you can count on a specific &#8220;lag time:&#8221; the time between your request for action and the computer&#8217;s noticeable execution of your request. A standard operating system, however, may feel disjointed because the lag time is unreliable. To achieve time reliability, real-time programs and their operating system environment must prioritize deadline actualization before anything else. In the gaming example, this might result in dropped frames or lower visual quality when reaction time and visual effects conflict.</p>
<h2 style="text-align: left">Methods</h2>
<p style="text-align: left">An operating system is considered real-time if it invariably enables its programs to perform tasks within specific time constraints, usually those expected by the user. To meet this definition, some or all of the following methods are employed:</p>
<ul style="text-align: left">
<li>The RTOS performs few tasks, thus ensuring that the tasks will always be executed before the deadline</li>
<li>The RTOS drops or reduces certain functions when they cannot be executed within the time constraints (&#8220;load shedding&#8221;)</li>
<li>The RTOS monitors input consistently and in a timely manner</li>
<li>The RTOS monitors resources and can interrupt background processes as needed to ensure real-time execution</li>
<li>The RTOS anticipates potential requests and frees enough of the system to allow timely reaction to the user&#8217;s request</li>
<li>The RTOS keeps track of how much of each resource (CPU time per timeslice, RAM, communications bandwidth, etc.) might possibly be used in the worst-case by the currently-running tasks, and refuses to accept a new task unless it &#8220;fits&#8221; in the remaining un-allocated resources.</li>
</ul>
<h2 style="text-align: left">Objectives</h2>
<p style="text-align: left">An RTOS must respond in a timely manner to changes, but that does not necessarily mean that an RTOS can handle a large throughput of data. In fact in an RTOS, small response times are valued much higher than computing power, or data speed. Sometimes an RTOS will even need to drop data to ensure that it meets its strict deadlines. In essence, that provides us with a perfect definition: an RTOS is an operating system designed to meet strict deadlines. Beyond that definition, there are few requirements as to what an RTOS must be, or what features it must have. Some RTOS implementations are very complete and very robust, while other implementations are very simple, and suited for only one particular purpose. An RTOS may be either event-driven or time-sharing. An event-driven RTOS is a system that changes state only in response to an incoming event. A time-sharing RTOS is a system that changes state as a function of time</p>
<h2 style="text-align: left">The Fundamentals</h2>
<p style="text-align: left">To most people, embedded systems are not recognizable as computers. Instead, they are hidden inside everyday objects that surround us and help us in our lives. Embedded systems typically do not interface with the outside world through familiar personal computer interface devices such as a mouse, keyboard and graphic user interface. Instead, they interface with the outside world through unusual interfaces such as sensors, actuators and specialized communication links. Real-time and embedded systems operate in constrained environments in which computer memory and processing power are limited. They often need to provide their services within strict time deadlines to their users and to the surrounding world. It is these memory, speed and timing constraints that dictate the use of real-time operating systems in embedded software.</p>
<h2 style="text-align: left">Real-Time Kernel</h2>
<p style="text-align: left">The heart of a real-time OS (and the heart of every OS, for that matter) is the kernel. A kernel is the central core of an operating system, and it takes care of all the OS jobs:</p>
<ol style="text-align: left">
<li>Booting</li>
<li>Task Scheduling</li>
<li>Standard Function Libraries</li>
</ol>
<p style="text-align: left">Now, we will talk about booting and bootloaders later, and we will also devote several chapters to task scheduling. So we should mention at least one thing about standard function libraries: In an embedded system, there is rarely enough memory (if any) to maintain a large function library. If functions are going to be included, they must be small, and important.</p>
<p style="text-align: left">In an embedded system, frequently the kernel will boot the system, initialize the ports and the global data items. Then, it will start the scheduler and instantiate any hardware timers that need to be started. After all that, the Kernel basically gets dumped out of memory (except for the library functions, if any), and the scheduler will start running the child tasks.</p>
<h2 style="text-align: left">Basic Kernel Services</h2>
<p style="text-align: left">In the discussion below, we will focus on the &#8220;kernel&#8221; – the part of an operating system that provides the most basic services to application software running on a processor. The &#8220;kernel&#8221; of a real-time operating system (&#8220;RTOS&#8221;) provides an &#8220;abstraction layer&#8221; that hides from application software the hardware details of the processor (or set of processors) upon which the application software will run.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/rtos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MEMORY</title>
		<link>https://www.emblogic.com/blog/02/memory/</link>
		<comments>https://www.emblogic.com/blog/02/memory/#comments</comments>
		<pubDate>Sat, 22 Feb 2014 11:38:52 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8494</guid>
		<description><![CDATA[Physical and virtual memory Traditionally, one has physical memory, that is, memory that is actually present in the machine, and virtual memory, that is, address space. Usually the virtual memory is much larger than the physical memory, and some hardware &#8230; <a href="https://www.emblogic.com/blog/02/memory/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>Physical and virtual memory</strong></p>
<p>Traditionally, one has physical memory, that is, memory that is actually present in the machine, and virtual memory, that is, address space. Usually the virtual memory is much larger than the physical memory, and some hardware or software mechanism makes sure that a program can transparently use this much larger virtual space while in fact only the physical memory is available. Nowadays things are reversed: on a Pentium II one can have 64 GB physical memory, while addresses have 32 bits, so that the virtual memory has a size of 4 GB. We&#8217;ll have to wait for a 64-bit architecture to get large amounts of virtual memory again. The present situation on a Pentium with more than 4 GB is that using the PAE (Physical Address Extension) it is possible to place the addressable 4 GB anywhere in the available memory, but it is impossible to have access to more than 4 GB at once.</p>
<p><strong>Kinds of memory</strong> -&gt; Kernel and user space work with virtual addresses (also called linear addresses) that are mapped to physical addresses by the memory management hardware. This mapping is defined by page tables, set up by the operating system. DMA devices use bus addresses. On an i386 PC, bus addresses are the same as physical addresses, but other architectures may have special address mapping hardware to convert bus addresses to physical addresses. Under Linux one has #include phys_addr = virt_to_phys(virt_addr); virt_addr = phys_to_virt(phys_addr); bus_addr = virt_to_bus(virt_addr); virt_addr = bus_to_virt(bus_addr); All this is about accessing ordinary memory. There is also &#8220;shared memory&#8221; on the PCI or ISA bus. It can be mapped inside a 32-bit address space using ioremap(), and then used via the readb(), writeb() (etc.) functions. Life is complicated by the fact that there are various caches around, so that different ways to access the same physical address need not give the same result. See asm/io.h and Documentation/{IO-mapping.txt,DMA-mapping.txt,DMA-API.txt}.</p>
<p><strong>Kernel memory handling Pages</strong> &#8211;&gt;The basic unit of memory is the page. Nobody knows how large a page is (that is why the Linux swapspace structure, with a signature at the end of a page, is so unfortunate), this is architecture-dependent, but typically PAGE_SIZE = 4096. (PAGE_SIZE equals 1 &lt;&lt; PAGE_SHIFT, and PAGE_SHIFT is 12, 13, 14, 15, 16 on the various architectures). If one is lucky, the getpagesize() system call returns the page size. Usually, the page size is determined by the hardware: the relation between virtual addresses and physical addresses is given by page tables, and when a virtual address is referenced that does not (yet) correspond to a physical address, a page fault occurs, and the operating system can take appropriate action. Most hardware allows a very limited choice of page sizes. (For example, a Pentium II knows about 4KiB and 4MiB pages.) Kernel memory allocation Buddy system The kernel uses a buddy system with power-of-two sizes. For order 0, 1, 2, &#8230;, 9 it has lists of areas containing 2^order pages. If a small area is needed and only a larger area is available, the larger area is split into two halves (buddies), possibly repeatedly. In this way the waste is at most 50%. Since 2.5.40, the number of free areas of each order can be seen in /proc/buddyinfo. When an area is freed, it is checked whether its buddy is free as well, and if so they are merged. Read the code in mm/page_alloc.c. get_free_page The routine __get_free_page() will give us a page. The routine __get_free_pages() will give a number of consecutive pages. (A power of two, from 1 to 512 or so. The above buddy system is used.)</p>
<p>kmalloc</p>
<p>The routine kmalloc() is good for an area of unknown, arbitrary, smallish length, in the range 32-131072 (more precisely: 1/128 of a page up to 32 pages), preferably below 4096. For the sizes, see . Because of fragmentation, it will be difficult to get large consecutive areas from kmalloc(). These days kmalloc() returns memory from one of a series of slab caches (see below) with names like &#8220;size-32&#8243;, &#8230;, &#8220;size-131072&#8243;. Priority Each of the above routines has a flags parameter (a bit mask) indicating what behaviour is allowed. Deadlock is possible when, in order to free memory, some pages must be swapped out, or some I/O must be completed, and the driver needs memory for that. This parameter also indicated where we want the memory (below 16M for ISA DMA, or ordinary memory, or high memory). Finally, there is a bit specifying whether we would like a hot or a cold page (that is, a page likely to be in the CPU cache, or a page not likely to be there). If the page will be used by the CPU, a hot page will be faster. If the page will be used for device DMA the CPU cache would be invalidated anyway, and a cold page does not waste precious cache contents.</p>
<h3>vmalloc</h3>
<p>The routine <code>vmalloc()</code> has a similar purpose, but has a better chance of being able to return larger consecutive areas, and is more expensive. It uses page table manipulation to create an area of memory that is consecutive in virtual memory, but not necessarily in physical memory. Device I/O to such an area is a bad idea. It uses the above calls with GFP_KERNEL to get its memory, so cannot be used in interrupt context.</p>
<h3>bigphysarea</h3>
<p>There is a patch around, the &#8221; BIGPHYSAREA PATCH&#8221;, allowing one to reserve a large area at boot time. Some devices need a lot of room (for video frame grabbing, scanned images, wavetable synthesis, etc.). See, e.g., <code>video/zr36067.c</code>.</p>
<h3>The slab cache</h3>
<p>The routine <code>kmalloc</code> is general purpose, and may waste up to 50% space. If certain size areas are needed very frequently, it makes sense to have separate pools for them. For example, Linux has separate pools for inodes, dentries, buffer heads. The pool is created using <code>kmem_cache_create()</code>, and allocation is by <code>kmem_cache_alloc()</code>.</p>
<p>The number of special purpose caches is increasing quickly. I have here a 2.4.18 system with 63 slab caches, and a 2.5.56 one with 149 slab caches. Probably this number should be reduced a bit again.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/memory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>/dev  directory</title>
		<link>https://www.emblogic.com/blog/02/dev-directory/</link>
		<comments>https://www.emblogic.com/blog/02/dev-directory/#comments</comments>
		<pubDate>Tue, 11 Feb 2014 19:23:12 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8309</guid>
		<description><![CDATA[The /dev directory contains the special device files for all the devices. The device files are created during installation, and later with the /dev/MAKEDEV script. The /dev/MAKEDEV.local is a script written by the system administrator that creates local-only device files &#8230; <a href="https://www.emblogic.com/blog/02/dev-directory/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: left">The <tt>/dev</tt> directory contains the special device files for all the devices. The device files are created during installation, and later with the /dev/MAKEDEV script. The /dev/MAKEDEV.local is a script written by the system administrator that creates local-only device files or links (i.e. those that are not part of the standard MAKEDEV, such as device files for some non-standard device driver).All hardware files are present in /dev(Device ) folder. If we observe the /dev folder you can find files/folders related to different hardware’s present in the machine.Below are some hardware files and their uses and explanation.<strong></strong></p>
<p style="text-align: left"><strong>1. /dev/alarm</strong></p>
<p style="text-align: left">This is a hardware file used to keep track of time when system goes hibernation or suspended when it is idle. When your system goes hibernation most of your hardware will be shutdown, HDD rotation is reduced to as low as possible in order to save power. This file is very much useful to keep track of system time, to do calender updates to user etc. You can say in other words that /dev/alarm will have current time status. This file is used in portable devices such as laptops and mobiles mostly.</p>
<h3 style="text-align: left"><strong>2. /dev/autofs</strong></h3>
<p style="text-align: left">This file is used to mount remote directories locally. This is done automatically when user tries to login by mounting remote directory. The mounting is done by using this hardware file. With out this hardware file we can not do automount in a Linux box.</p>
<h3 style="text-align: left"><strong>3. /dev/block folder</strong></h3>
<p style="text-align: left">This folder is legacy location for your block devices. This is still existing to support legacy applications.</p>
<h3 style="text-align: left"><strong>4. /dev/cdrom, /dev/dvd, /dev/cdrw, /dev/dvd-rw etc</strong></h3>
<p style="text-align: left">These files corresponds to Compact-Disk(/dev/cdrom or /dev/cdrw) hardware or to Digital Versatile Disk(/dev/dvd or /dev/dvd-rw) hardware. These files are required to mount your local CDrom and DVD’s so that you can access the content of the file.</p>
<h3 style="text-align: left"><strong>5. /dev/char</strong></h3>
<p style="text-align: left">This is the folder where char files are located in legacy machines. This is still kept to support legacy applications.</p>
<h3 style="text-align: left"><strong>6. /dev/console, /dev/tty, /dev/tty1 to /dev/tty63, /dev/ttyS, /dev/ttyS0 to /dev/ttyS31 files and /dev/pts folder</strong></h3>
<p style="text-align: left">These device files are called as terminals or consoles which are char files used for communication between user and system. /dev/console file is used in Runlevel1 1 and none of these terminals are available for access on runlevel 1. tty(Teletype) is a device file to do remote connection so that we can work remotely The name is derived from typewriters which are default communicating devices in early stages of Computers. The terminals range from tty0 to tty63 and serial port terminals(ttys or ttyS) are from 0 to 31.<a href="http://flavors.linuxnix.com/" target="_blank"><br />
</a></p>
<h3 style="text-align: left"><strong>7. /dev/loop(/dev/loop0 to /dev/loop7)</strong></h3>
<p style="text-align: left">A loop device is a Pseudo device useful for mounting Virtual CD(ISO files), HDD etc. The loop devices are useful for mounting already formatted drive and access the data in a folder mounted on different filesystem. Virtual devices are nothing but a hardware file created by kernel/OS so that we can use them as a physical drives. These loop devices are also used by virtual softwares such as KVM, VMWARE to mount CD-ROM’s, HDD(.img files for example) as physical devices in your Virtual machine.<strong><a title="How to mount ISO image files in Linux?" href="http://www.linuxnix.com/2012/08/how-to-mount-iso-image-files-in-linux.html" target="_blank"><br />
</a></strong></p>
<h3 style="text-align: left"><strong>8. /dev/sda, /dev/hda etc</strong></h3>
<p style="text-align: left">These files corresponding to hard disks and storage devices such as USB hard disks, SATA disks and External HDD’s. For Intel machines you may find /dev/hda, /dev/hdb, /dev/hdc, /dev/hdd corresponds to Primary master, Primary slave, Secondary master and Secondary Slave devices. Partitions with in disks are created as /dev/sda1, sda2 etc and so on.</p>
<p style="text-align: left"><strong>9. /dev/random and /dev/urandom</strong></p>
<p style="text-align: left">Used for generating random chars for Kernel purpose.</p>
<p style="text-align: left"><strong>10. /dev/null and /dev/zero</strong></p>
<p style="text-align: left">Used for generating empty files, observing unwanted outputs etc.</p>
<h3 style="text-align: left"><strong>11. /dev/ppp</strong></h3>
<p style="text-align: left">This file is used to connect your mobile or GPRS/3G enabled devices to connect and communicate. This is pseudo file which communicates with GPRS enabled hardware file to send data.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/dev-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>character driver initialization completed</title>
		<link>https://www.emblogic.com/blog/01/character-driver-initialization-completed/</link>
		<comments>https://www.emblogic.com/blog/01/character-driver-initialization-completed/#comments</comments>
		<pubDate>Thu, 09 Jan 2014 11:21:27 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8064</guid>
		<description><![CDATA[LOG FILE FOR ENTRY OF A MODULE IN KERNEL : head    1.4; access; symbols; locks root:1.4; strict; comment    @ * @; 1.4 date    2014.01.09.16.41.19;    author root;    state Exp; branches; next    1.3; 1.3 date    2014.01.06.14.28.40;    author root;    state Exp; branches; next    &#8230; <a href="https://www.emblogic.com/blog/01/character-driver-initialization-completed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>LOG FILE FOR ENTRY OF A MODULE IN KERNEL :</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.41.19;    author root;    state Exp;<br />
branches;<br />
next    1.3;</p>
<p>1.3<br />
date    2014.01.06.14.28.40;    author root;    state Exp;<br />
branches;<br />
next    1.2;</p>
<p>1.2<br />
date    2014.01.06.14.10.20;    author root;    state Exp;<br />
branches;<br />
next    1.1;</p>
<p>1.1<br />
date    2014.01.06.13.06.31;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@source file for driver registration using alloc_chrdev_registration .<br />
@</p>
<p>1.4<br />
log<br />
@initialization scull  &amp;  c_dev for multiple devices and export a function in symbol table by using EXPORT_SYMBOL.<br />
@</p>
<p>LOG FILE FOR DELETION OF A MODULE IN KERNEL :</p>
<p>head    1.3;<br />
access;<br />
symbols;<br />
locks<br />
root:1.3; strict;<br />
comment    @ used free &amp; unregister @;</p>
<p>1.3<br />
date    2014.01.06.14.41.04;    author root;    state Exp;<br />
branches;<br />
next    1.2;</p>
<p>1.2<br />
date    2014.01.06.14.20.34;    author root;    state Exp;<br />
branches;<br />
next    1.1;</p>
<p>1.1<br />
date    2014.01.06.13.15.52;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@source file for driver to unregister it from kernel.<br />
@</p>
<p>1.3<br />
log<br />
@ remove the cdev from device table using cdev_del and deallocate the memory too and unregister the driver.<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/character-driver-initialization-completed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTP USING SOCKET OVER THE NETWORK</title>
		<link>https://www.emblogic.com/blog/12/ftp-using-socket-over-the-network/</link>
		<comments>https://www.emblogic.com/blog/12/ftp-using-socket-over-the-network/#comments</comments>
		<pubDate>Mon, 30 Dec 2013 10:47:30 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7958</guid>
		<description><![CDATA[-&#62;THIS IS SERVER head    1.1; access; symbols; locks root:1.1; strict; comment    @ * @; 1.1 date    2013.12.30.10.36.35;    author root;    state Exp; branches; next    ; desc @this is server which is asking for username and password from client to check its &#8230; <a href="https://www.emblogic.com/blog/12/ftp-using-socket-over-the-network/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>-&gt;THIS IS SERVER</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2013.12.30.10.36.35;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@this is server which is asking for username and password from client to check its authentication<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@</p>
<p>-&gt;THIS IS CLIENT</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2013.12.30.10.39.00;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@this is client which is requesting for connection to the server<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@</p>
<p>-&gt;THIS DATABASE OF SERVER</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @# @;</p>
<p>1.1<br />
date    2013.12.30.10.39.36;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@this is database of server<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/ftp-using-socket-over-the-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Brief Introduction about Socket-</title>
		<link>https://www.emblogic.com/blog/12/a-brief-introduction-about-socket/</link>
		<comments>https://www.emblogic.com/blog/12/a-brief-introduction-about-socket/#comments</comments>
		<pubDate>Mon, 30 Dec 2013 07:45:37 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7903</guid>
		<description><![CDATA[A socket is a communication mechanism that allows client/server systems to be developed either locally, on a single machine, or across networks. Linux functions such as printing, connecting to databases, and serving web pages as well as network utilities such &#8230; <a href="https://www.emblogic.com/blog/12/a-brief-introduction-about-socket/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A socket is a communication mechanism that allows client/server systems to be developed either locally, on a single machine, or across networks. Linux functions such as printing, connecting to databases, and<br />
serving web pages as well as network utilities such as rlogin for remote login and ftp for file transfer usually use sockets to communicate.<br />
Sockets are created and used differently from pipes because they make a clear distinction between client and server. The socket mechanism can implement multiple clients attached to a single server.</p>
<p>In simple words we can say, Sockets are basically an extension of pipe.<br />
First, a server application creates a socket, which like a file descriptor is a resource assigned to the server<br />
process and that process alone. The server creates it using the system call socket, and it can’t be shared<br />
with other processes.<br />
The server process gives the socket a name. Local sockets are given a filename in the Linux file system, often to be found in /tmp or /usr/tmp. For network sockets, the filename will be a service identifier (port number/access point) relevant to the particular network to which the clients can connect. This identifier allows Linux to route incoming connections specifying a particular port number to the correct server process.A socket is named using the system call bind. The server process then waits for a client to connect to the named socket. The system call, listen, creates a queue for incoming connections. The server can accept them using the system call accept. When the server calls accept, a new socket is created that is distinct from the named socket. This new socket is used solely for communication with this particular client. The named socket remains for further connections from other clients. If the server is written appropriately, it can take advantage of multiple connections. A web server will do this so that it can serve pages to many clients at once. For a simple server, further clients wait on the listen queue until the server is ready again. The client side of a socket-based system is more straight forward. The client creates an unnamed socket by calling socket. It then calls connect to establish a connection with the server by using the server’s named socket as an address. Once established, sockets can be used like low-level file descriptors, providing two-way data communications.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/a-brief-introduction-about-socket/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>socket implementation</title>
		<link>https://www.emblogic.com/blog/12/socket-implementation/</link>
		<comments>https://www.emblogic.com/blog/12/socket-implementation/#comments</comments>
		<pubDate>Sun, 29 Dec 2013 09:46:12 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7882</guid>
		<description><![CDATA[this is server side: head    ; access; symbols; locks; strict; comment    @ * @; desc @this is server side, which is reading a request from client and also writing data to client side @ this is client side: head    ; &#8230; <a href="https://www.emblogic.com/blog/12/socket-implementation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>this is server side:</p>
<p>head    ;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment    @ * @;</p>
<p>desc<br />
@this is server side, which is reading a request from client and also writing data to client side<br />
@</p>
<p>this is client side:</p>
<p>head    ;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment    @ * @;</p>
<p>desc<br />
@this is client side which is sending data to server and recieving data from server<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/socket-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implemented IPC using threads and FIFo&#8217;s</title>
		<link>https://www.emblogic.com/blog/12/implemented-ipc-using-threads-and-fifos/</link>
		<comments>https://www.emblogic.com/blog/12/implemented-ipc-using-threads-and-fifos/#comments</comments>
		<pubDate>Sat, 28 Dec 2013 12:10:09 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7861</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/implemented-ipc-using-threads-and-fifos/">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/implemented-ipc-using-threads-and-fifos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Completed&#8212;- Client-Server IPC using Message Queues.</title>
		<link>https://www.emblogic.com/blog/12/completed-client-server-ipc-using-message-queues/</link>
		<comments>https://www.emblogic.com/blog/12/completed-client-server-ipc-using-message-queues/#comments</comments>
		<pubDate>Wed, 25 Dec 2013 05:03:03 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7841</guid>
		<description><![CDATA[Log File For Server: head    1.2; access; symbols; locks root:1.2; strict; comment    @ * @; 1.2 date    2013.12.24.10.09.27;    author root;    state Exp; branches; next    1.1; 1.1 date    2013.12.24.09.32.25;    author root;    state Exp; branches; next    ; desc @This is the main &#8230; <a href="https://www.emblogic.com/blog/12/completed-client-server-ipc-using-message-queues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Log File For Server:</p>
<p>head    1.2;<br />
access;<br />
symbols;<br />
locks<br />
root:1.2; strict;<br />
comment    @ * @;</p>
<p>1.2<br />
date    2013.12.24.10.09.27;    author root;    state Exp;<br />
branches;<br />
next    1.1;</p>
<p>1.1<br />
date    2013.12.24.09.32.25;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@This is the main server source file for client server project using message queue.<br />
@</p>
<p>1.2<br />
log<br />
@This is the final source code of server.<br />
change the value of msg_id of msg_st.<br />
————————————————————————————————</p>
<p>Log File For Req_add<br />
head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2013.12.24.09.38.26;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@This is the request client for addition.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision</p>
<p>&nbsp;</p>
<p>—————————————————————————————-</p>
<p>Log file for Req_sub</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2013.12.24.10.06.30;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@This is the source code of requesting client for substration.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision</p>
<p>&nbsp;</p>
<p>—————————————————————————————-</p>
<p>log file for Req_Mul</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2013.12.24.10.07.13;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@This is source code of requesting client for multiplication.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision</p>
<p>—————————————————————————————</p>
<p>Log file For Proccesing_Add</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2013.12.24.09.54.10;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@This is the source code of processing client for addition.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision</p>
<p>—————————————————————————————</p>
<p>Log file For Proccesing_Sub</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2013.12.24.10.08.22;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@This is source code of processing client for substraction.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision</p>
<p>—————————————————————————————</p>
<p>Log file For Proccesing_Mul</p>
<p>head    1.1;<br />
access;<br />
symbols;<br />
locks<br />
root:1.1; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2013.12.24.10.09.14;    author root;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@This is source code of processing client for multiplcation.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/completed-client-server-ipc-using-message-queues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pipe(a brief introduction)</title>
		<link>https://www.emblogic.com/blog/12/pipea-brief-introduction/</link>
		<comments>https://www.emblogic.com/blog/12/pipea-brief-introduction/#comments</comments>
		<pubDate>Fri, 20 Dec 2013 12:01:48 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7799</guid>
		<description><![CDATA[What is pipe in our day to day life? Pipe is basically a connector to send any thing from one place to another. It has same meaning in Linux C. We create pipe to connect data flow from one process &#8230; <a href="https://www.emblogic.com/blog/12/pipea-brief-introduction/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>What is pipe in our day to day life?</p>
<p>Pipe is basically a connector to send any thing from one place to another.</p>
<p>It has same meaning in Linux C. We create pipe to connect data flow from one process to another. It is a very paramount aspect of IPC &#8211; Inter Process Communication.Pipe is half duplex.</p>
<p>To create a simple pipe with C, we make use of the pipe() system call. It takes a single argument, which is an array of two integers, and if successful, the array will contain two new file descriptors to be used for the pipeline.</p>
<p>the prototype of pipe function is:</p>
<p>#include&lt;unistd.h&gt;</p>
<p>int pipe(int fd[2]);</p>
<p>After creating a pipe, the process typically spawns a new process . The first integer in the array (element 0) is set up and opened for reading, while the second integer (element 1) is set up and opened for writing. Once we have established the pipeline, we then fork our new child process:</p>
<p>If the parent wants to receive data from the child, it should close fd1, and the child should close fd0. If the parent wants to send data to the child, it should close fd0, and the child should close fd1. Since descriptors are shared between the parent and child, we should always be sure to close the end of pipe we aren&#8217;t concerned with. On a technical note, the EOF will never be returned if the unnecessary ends of the pipe are not explicitly closed.</p>
<p>The real advantage of pipe is when you wish to pass data between two processes which have any ancestoral relation.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/pipea-brief-introduction/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/</link>
		<comments>https://www.emblogic.com/blog/11/article-on-c/#comments</comments>
		<pubDate>Mon, 25 Nov 2013 12:13:33 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Project 2: Multiple Data Compression and Encryption]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7531</guid>
		<description><![CDATA[PROJECT 01(C-Programming based project) This project is totally based on C language as the name suggests .It is a middle level language , basically it is a compiler dependent. Being an engineer this C language is a very paramount part &#8230; <a href="https://www.emblogic.com/blog/11/article-on-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p align="CENTER"><span style="font-size: medium"><strong>PROJECT 01(C-Programming based project)</strong></span></p>
<p align="LEFT"><span style="font-size: small">This project is totally based on C language as the name suggests .It is a middle level language , basically it is a compiler dependent. Being an engineer this C language is a very paramount part of a technical skills of an engineer. Moreover there is a C based project i.e. “Multiple Data Compression” in data is compressed and prepared it in encrypted form. This project teaches how to </span></p>
<p align="LEFT"><span style="font-size: small">use C and how to execute it at an industry level projects.</span></p>
<p align="LEFT"><a name="intellitxt"></a><span style="font-size: small"><span style="font-family: Liberation Serif,serif"><strong>MULTIPLE DATA COMPRESSION(MDC):</strong></span><span style="font-family: Liberation Serif,serif"> Main aim of this project is to e</span><span style="color: #333333"><span style="font-family: Liberation Serif,serif">ncode</span></span><span style="color: #333333"><span style="font-family: Liberation Serif,serif"> data to take up less storage space and less bandwidth for transmission. Digital data are compressed by finding repeatable patterns of binary 0s and 1s. </span></span></span></p>
<p><span style="color: #333333"><span style="font-family: Liberation Serif,serif"><span style="font-size: small">Data compression is particularly useful in communications because it enables devices to transmit or store the same amount of data in fewer bits. There are a variety of data compression techniques, but only a few have been standardized.</span></span></span></p>
<p><span style="font-size: small"><span style="color: #333333"><span style="font-family: Liberation Serif,serif">Encryption is the conversion of data into a form, called a cipher text, that cannot be easily understood by unauthorized people. Decryption is the process of converting encrypted data back into its original form, so it can be understood</span></span><span style="color: #333333"><span style="font-family: Liberation Serif,serif"><span style="font-size: x-small">.</span></span></span></span></p>
<p align="LEFT"><span style="font-size: small">In Project 01, we started from scratch. We covered all individuals topics in C one by one and went through almost all aspects of every topics. We also interrelate different topics with each other such as </span></p>
<p align="LEFT"><span style="font-size: small">pointers with structures, array with pointers etc.</span></p>
<p align="LEFT"><span style="font-size: small">We covered all these topics one by one:</span></p>
<ol>
<li>
<p align="LEFT"><span style="font-size: small">First of all, we come to know about all basics syntax and semantics , keywords, constants of C languages . Memory allocation in C language . We come to know how memory is allocated to different data types? Mainly we come to know the style of programming , value of indentation, value of memory, how to write big and big programmes in lesser lines.</span></p>
</li>
<li>
<p align="LEFT"><span style="font-size: small">We covered many topics:</span></p>
<ul>
<li>
<p align="LEFT">Conditional statements: it is used when we want to execute a particular set of statements followed by a particular condition. There are basically three types of conditional statements:</p>
<ul>
<li>
<p align="LEFT">IF ,IF-ELSE</p>
</li>
<li>
<p align="LEFT">SWITCH</p>
</li>
<li>
<p align="LEFT">USING RELATIONAL OPERATORS</p>
</li>
</ul>
</li>
</ul>
</li>
</ol>
<ul>
<li>
<p align="LEFT">Control structures: loops – It is basically using a particular set of statements for a number of times iteratively. There are basically three types of control structures:</p>
<ul>
<li>
<p align="LEFT">FOR- for(initilization, condition,increment/decrement)</p>
</li>
<li>
<p align="LEFT">WHILE- initilization</p>
<p align="LEFT">while(condition)</p>
<p align="LEFT">{ set of statements</p>
<p align="LEFT">increment/decrement}</p>
</li>
</ul>
</li>
</ul>
<ul>
<li>
<p align="LEFT">DO-WHILE- do{ set of statements}</p>
<p align="LEFT">while(condition);</p>
</li>
</ul>
<ul>
<li>
<p align="LEFT">Arrays and Strings: Array is a collection of same data type stored in a continuous memory locations.</p>
<p align="LEFT">String is collection of same data type i.e. Character data type stored in a continuous memory location and strings are stored in stack memory.</p>
</li>
<li>
<p align="LEFT">Pointers: It is a variable which holds the address of another variable . It always occupies 4 bytes of memory irrespective of its mentioned data type. Mentioned data type just indicate about the type of variable whose address is stored in pointer type variable.</p>
</li>
<li>
<p align="LEFT">Another topics related to C are FILE IO: File input output system. It is of two types: Low level and high level</p>
<p align="LEFT">STRUCTURES AND UNIONS, LINKED LIST, STACKS AND QUEUES , FUNCTIONS , SEARCHING AND SORTING TECHNIQUES.</p>
</li>
<li>
<p align="LEFT">There are various project management tools:</p>
<p align="LEFT">CVS- Concurrent Version System</p>
</li>
</ul>
<p align="LEFT">RCS- Revision Control System</p>
<p align="LEFT">MAKE FILE- multiple targets in one file</p>
<p align="LEFT">GDB-GNU Debugger</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/article-on-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C program</title>
		<link>https://www.emblogic.com/blog/10/c-program-3/</link>
		<comments>https://www.emblogic.com/blog/10/c-program-3/#comments</comments>
		<pubDate>Fri, 25 Oct 2013 14:56:25 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Jasmeen ma'am]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7392</guid>
		<description><![CDATA[# define min(a,b)  ((a)&#60;(b))?(a):(b) int main() { int i=0,a=0; while(min(a++,9)&#60;8) i=i+1; printf(&#8220;%d\n&#8221;,i); return 0; } what will be output? how n why ?]]></description>
				<content:encoded><![CDATA[<p># define min(a,b)  ((a)&lt;(b))?(a):(b)</p>
<p>int main()</p>
<p>{ int i=0,a=0;</p>
<p>while(min(a++,9)&lt;8)</p>
<p>i=i+1;</p>
<p>printf(&#8220;%d\n&#8221;,i);</p>
<p>return 0;</p>
<p>}</p>
<p>what will be output? how n why ?</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/10/c-program-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>batch 39 &#8211; project 01</title>
		<link>https://www.emblogic.com/blog/10/batch-39-project-01/</link>
		<comments>https://www.emblogic.com/blog/10/batch-39-project-01/#comments</comments>
		<pubDate>Mon, 21 Oct 2013 08:13:22 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Jasmeen ma'am]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7379</guid>
		<description><![CDATA[plz guide me for solving Q2&#8211;&#62;assignment-loops]]></description>
				<content:encoded><![CDATA[<p>plz guide me for solving Q2&#8211;&gt;assignment-loops</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/10/batch-39-project-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bizarre condition</title>
		<link>https://www.emblogic.com/blog/10/bizarre-condition/</link>
		<comments>https://www.emblogic.com/blog/10/bizarre-condition/#comments</comments>
		<pubDate>Fri, 18 Oct 2013 15:41:03 +0000</pubDate>
		<dc:creator><![CDATA[Himalaya Batra]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Dheeraj sir]]></category>
		<category><![CDATA[Harpreet sir]]></category>
		<category><![CDATA[Jasmeen ma'am]]></category>
		<category><![CDATA[pravjot sir]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7353</guid>
		<description><![CDATA[whenever i open terminal, this ~~ automatically starts printing on my screen continuously&#8230;&#8230; it also create very much problem while typing&#8230;.. and main thing is this is not a hardware problem of my laptop&#8230; because this problem was not there &#8230; <a href="https://www.emblogic.com/blog/10/bizarre-condition/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>whenever i open terminal, this ~~ automatically starts printing on my screen continuously&#8230;&#8230; it also create very much problem while typing&#8230;.. and main thing is this is not a hardware problem of my laptop&#8230; because this problem was not there in windows 7 but this problem came in to notice after installing fedora 17. please suggest me what to do ???</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/10/bizarre-condition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
