<?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; abhishek.gangwar</title>
	<atom:link href="https://www.emblogic.com/blog/author/abhishek-gangwar/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>Flash Player Installation Script for Fedora</title>
		<link>https://www.emblogic.com/blog/01/flash-player-installation-script-for-fedora/</link>
		<comments>https://www.emblogic.com/blog/01/flash-player-installation-script-for-fedora/#comments</comments>
		<pubDate>Sat, 25 Jan 2014 07:21:32 +0000</pubDate>
		<dc:creator><![CDATA[abhishek.gangwar]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8186</guid>
		<description><![CDATA[#!/bin/bash if [[ $(uname -a &#124; grep x86_64) ]] then rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm rpm &#8211;import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux else rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm rpm &#8211;import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux fi yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl]]></description>
				<content:encoded><![CDATA[<p>#!/bin/bash<br />
if [[ $(uname -a | grep x86_64) ]]<br />
then<br />
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm<br />
rpm &#8211;import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux<br />
else<br />
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm<br />
rpm &#8211;import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux<br />
fi<br />
yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/flash-player-installation-script-for-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Block Driver</title>
		<link>https://www.emblogic.com/blog/12/block-driver-6/</link>
		<comments>https://www.emblogic.com/blog/12/block-driver-6/#comments</comments>
		<pubDate>Mon, 30 Dec 2013 08:50:55 +0000</pubDate>
		<dc:creator><![CDATA[abhishek.gangwar]]></dc:creator>
				<category><![CDATA[Block Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7947</guid>
		<description><![CDATA[Have you ever used VIM editer in the linux? If yes then you must have observed that whatever you type in the editor is visible to you and your system knows that what characters you have written. It means these &#8230; <a href="https://www.emblogic.com/blog/12/block-driver-6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Have you ever used VIM editer in the linux? If yes then you must have observed that whatever you type in the editor is visible to you and your system knows that what characters you have written. It means these characters are stored somewhere in the system.<br />
What happens when you just gave the :q command in the VIM editor, the editor is closed now and whatever characters you have written in the Vim Editor is lost now.<br />
What happens when you gave the :wq command in VIM, the editor is closed but whatever you have written in the Editor is not lost. You can get this saved file even after rebooting your system. If you know the secondary memory then it simply means that now the file is in the secondary storage.</p>
<p>Both the times the file was saved in the system but only difference is that for the first observation the file was saved in you primary memory and the second time you just saved your file in the secondary storage.</p>
<p>Who did this stuff? The answer is block layer of the Operating system.</p>
<p>This is just a example to understand what is the role of Block layer of the Operating System but there are too many stuffs in the operating system where the block driver works. To implement the block driver we can simply have a conclusion i.e. whenever we need to save the primary storage data into the secondary storage or to fetch the data stored in the secondary storage into the primary one, the block layer comes into the picture.</p>
<p>The block driver simply writes the block of bytes into the secondary storage from the primary storage or reads the block of bytes from secodary storage to the primary storage.</p>
<p>The block driver deals with the data in fixed size of blocks. Mostly all the devices which are used as the secondary storage are the block devices.</p>
<p>We require to mount a filesystem on the block devices. Filesystem provides the way of arrangment in the device and meaning of the simple 0s and 1s(raw data stored on the device) to the Operating System. The device file provides the interface between the filesystem and the block device driver. Filesystem can divide the disk (Mostly the secondary storage) into multiple logical parts i.e. partitions of the disk.</p>
<p>Block devices support random access and generally use buffered input and output routines. The operating system allocates a data buffer to hold a single block each for input and output. When a program sends a request to read data from, or write data to, the device, the system stores each character of that data in the appropriate buffer. When the buffer fills up, the appropriate operation takes place (data transfer) and the system clears the buffer.</p>
<p>The sector is the smallest addressable unit of the disk. Each sector stores a fixed amount of user-accessible data, traditionally 512 bytes for hard drives and 2048 bytes for CD-ROMs and DVD-ROMs. Newer hard drives use 4096-byte sectors.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/block-driver-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interrupt and IRQ</title>
		<link>https://www.emblogic.com/blog/12/interrupt-and-irq/</link>
		<comments>https://www.emblogic.com/blog/12/interrupt-and-irq/#comments</comments>
		<pubDate>Sat, 21 Dec 2013 03:53:07 +0000</pubDate>
		<dc:creator><![CDATA[abhishek.gangwar]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7813</guid>
		<description><![CDATA[To understand Interrupts in a general context, we can say that the Interrupts behaves same as the Signals for user space applications. Two Types of interrupts can be generated ? one is generated by the Processor control unit while executing &#8230; <a href="https://www.emblogic.com/blog/12/interrupt-and-irq/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>To understand Interrupts in a general context, we can say that the Interrupts behaves same as the Signals for user space applications.<br />
Two Types of interrupts can be generated ? one is generated by the Processor control unit while executing the instructions and the other one is generated by the other hardware device and generally called as the hardware interrupts.<br />
As the processor receives an Interrupt, the processor stops its normal execution of the instructions and switches to the different context other than the normal process context. This code (Interrupt handler) for this context is written specially for the particular Interrupt. The interrupt handling is quite different from the process context switching. But after the execution of the interrupt handler the last process resumes to the execution.<br />
Interrupt Handler function must not contain the sleep. Interrupt handler must execute in the minimum possible amount of time. If there is some task which as to be implemented as the interrupt arrives and this task requires some time to execute, then the code for this must be written in the bottom half. Workqueue or Softirq can be implemented in the bottom half. This should be done because while interrupt handler is running, the signals on the corresponding IRQ line are temporarily disabled. The handler also sends the acknowledgment to the Programmable Interrupt Controller that I am servicing the interrupt.<br />
IRQ (a kernel identifier) is a interrupt request from a device. During the execution of interrupt handler for a particular IRQ, the interrupt is disabled for that IRQ. Kernel also provides the facility to disable all interrupts issued by IRQ by a function. IRQ number provides the possible interrupt source on a machine.<br />
Most hardware controller are capable of issuing interrupt requests and these interrupt requests are fed to the Programmable Interrupt Controller. The Programmable Interrupt Controller is responsible for monitoring the IRQ lines and to inform the processor on the INTR pin of the processor.<br />
Several devices may share the same IRQ line and the most important thing that the kernel has to discover which I/O device corresponds to the particular IRQ number before enabling the Interrupt.<br />
The interrupt handler executes several Interrupt Service Routines. Each Interrupt Service routine is a function related to a single device sharing the IRQ lines. Hence the IRQ lines can be shared among different devices and the meaning of IRQ line becomes different for each IRQ line. The Interrupt Service Routine performs all operations that need to be executed when the device raise the interrupt. Most of the time Interrupt is  best way to avoid the polling mechanism. It is helpful to save the CPU cycles. There are priority mechanism among different interrupts.<br />
When the device driver&#8217;s interrupt handling routine is called by the Linux kernel it must efficiently work out why it was interrupted and respond. To find the cause of the interrupt the device driver should read the status register of the device that interrupted. Hence Interrupts are mostly used in the device drivers.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/interrupt-and-irq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Character Device Driver</title>
		<link>https://www.emblogic.com/blog/11/character-device-driver-4/</link>
		<comments>https://www.emblogic.com/blog/11/character-device-driver-4/#comments</comments>
		<pubDate>Mon, 25 Nov 2013 11:59:01 +0000</pubDate>
		<dc:creator><![CDATA[abhishek.gangwar]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7491</guid>
		<description><![CDATA[The kernel runs as a single process. In Linux kernel (modular kernel) there is a facility to insert and remove &#8220;loadable kernel module&#8221; at run time. These loadable kernel modules are called device drivers if they provide the mechanism to &#8230; <a href="https://www.emblogic.com/blog/11/character-device-driver-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The kernel runs as a single process. In Linux kernel (modular kernel) there is a facility to insert and remove &#8220;loadable kernel module&#8221; at run time. These loadable kernel modules are called device drivers if they provide the mechanism to access a device from the user space application. The most of the part of the Linux kernel is the device drivers.</p>
<p>&nbsp;</p>
<p>There are 3 types of drivers &#8211; character driver, block driver and pipe driver. In character drivers one byte of the data is accessed at a instant of time.</p>
<p>&nbsp;</p>
<p>One most important part of the driver is the Major and Minor numbers. The kernel distinguishes between various driver through their Major numbers and the Driver distinguishes between various devices (those are using the same driver) by a assigning a unique Minor number to it. The Major Minor combination is used to represent a unique device into a system.</p>
<p>Whenever we have to insert a loadable kernel module in the kernel we can use the “insmod” command. As the “insmod” command executes the initialization routine of the driver executes. And when the “rmmod” mode command runs the cleanup routine of the module executes.</p>
<p>&nbsp;</p>
<p>To write a kernel code we generally use the kernel objects which are already present in the kernel symbol table. These symbols are exported by the other routines of the kernel code which is already present in the kernel.</p>
<p>&nbsp;</p>
<p>In writing of a character driver, we first have to write the initialization function and the cleanup function. These functions provide the facilities to insert the module into the Linux kernel and to remove the module from the Linux kernel. While writing the driver whatever the functionality we want that “This should run when the module will be inserted in the Linux kernel”, we have to include those in the initialization function e.g.- registration of driver. And whatever we want that “This should run when the module will be removed from the Linux kernel”, we have to include those in the cleanup function.</p>
<p>&nbsp;</p>
<p>To access a device through the driver we first has to open that device. The open driver routine is written for this purpose. To write the data on the memory of the device the write driver routine is used and to read the data present on the memory of the device the read driver routine is written.</p>
<p>&nbsp;</p>
<p>These driver routines are mapped to the system calls. System calls are used by the application to access the device. Although system calls have some by default routines but in the driver we defines the system call according to the requirement of the device. These driver routines and the system calls of the user level interacts with each others via node present in the virtual filesystem. The driver routines uses various kernel data structures for various representations and uses various kernel macros for different operations and finally various logics implemented according to the requirement of the device. These logics defines the functionality of the device and hence the complete driver provides the mechanism</p>
<p>to access the device.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/character-device-driver-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
