<?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>LinuxEco &#187; Linux kernel jiffies</title>
	<atom:link href="http://linuxeco.com/?feed=rss2&#038;tag=linux-kernel-jiffies" rel="self" type="application/rss+xml" />
	<link>http://linuxeco.com</link>
	<description>Linux Ecosystems, Linux Kernel Training, Kernel Education and Information Exchange, Linux Training</description>
	<lastBuildDate>Fri, 03 Aug 2012 18:36:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Give me another jiffy, only a bit later</title>
		<link>http://linuxeco.com/?p=140</link>
		<comments>http://linuxeco.com/?p=140#comments</comments>
		<pubDate>Fri, 20 Jan 2012 16:44:00 +0000</pubDate>
		<dc:creator>Anand</dc:creator>
				<category><![CDATA[Interrupts]]></category>
		<category><![CDATA[Kernel Threads]]></category>
		<category><![CDATA[Linux Kernel]]></category>
		<category><![CDATA[Linux kernel preemption]]></category>
		<category><![CDATA[Linux kernel jiffies]]></category>

		<guid isPermaLink="false">http://linuxeco.com/?p=140</guid>
		<description><![CDATA[Given the description below, jiffies + 10*HZ means (now + 10 Seconds). And jiffies * 1000 would mean the elapsed time in milliseconds etc. An example of usage in the Linux Kernel would be in the drivers for XD, where, jiffies + 8*HZ later (as initialized in the member element expires of static struct timer_list) [...]]]></description>
			<content:encoded><![CDATA[<p>Given the description below, <strong>jiffies + 10*HZ</strong> means (now + 10 Seconds). And <strong>jiffies * 1000 </strong> would mean the elapsed time in milliseconds etc.</p>
<p>An example of usage in the Linux Kernel would be in the drivers for XD, where, <strong>jiffies + 8*HZ</strong> later (as initialized in the member element <strong>expires</strong> of <strong>static struct timer_list</strong>) a timer interrupt handler is programmed to execute.</p>
<p>The &#8220;watchdog handler&#8221; <strong>xd_watchdog</strong>, in this particular instance, wakes up a sleeping process.</p>
<p>Needless to say, all appropriate caveats emptor apply. Appropriate Processes need to have been sleeping, Timers must have been declared and initialized etc etc</p>
<p>I will blog on this at length later. Please subscribe to our mail list for automated updates on new blog entries.</p>
<p>I explain this specific Linux Kernel concept and more in my classes ( <strong>Advanced Linux Kernel Programming</strong> @UCSC-Extension, and also in other classes that I teach independently). As always, Feedback, Questions and Comments are appreciated and will be responded to.</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxeco.com/?feed=rss2&#038;p=140</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Kernel: Give me a Jiffy</title>
		<link>http://linuxeco.com/?p=120</link>
		<comments>http://linuxeco.com/?p=120#comments</comments>
		<pubDate>Fri, 20 Jan 2012 15:06:31 +0000</pubDate>
		<dc:creator>Anand</dc:creator>
				<category><![CDATA[critical code sections]]></category>
		<category><![CDATA[Interrupts]]></category>
		<category><![CDATA[Jiffies]]></category>
		<category><![CDATA[Linux Kernel]]></category>
		<category><![CDATA[Timers]]></category>
		<category><![CDATA[Jiffies linux kernel time keeping]]></category>
		<category><![CDATA[Linux kernel jiffies]]></category>

		<guid isPermaLink="false">http://linuxeco.com/?p=120</guid>
		<description><![CDATA[The jiffies variable is a counter that stores the number of elapsed ticks since the system was started It is increased by one when a timer interrupt occurs—that is, on every processor tick i.e. at HZ rate. HZ itself is configured globally. The Kernel makes generous use of this variable. An example would be to [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>jiffies</strong> variable is a counter that stores the number of elapsed ticks since the system was started</p>
<p>It is increased by one when a timer interrupt occurs—that is, on every processor <strong>tick</strong><br />
i.e. at <strong>HZ</strong> rate. <strong>HZ</strong> itself is configured globally.</p>
<p>The Kernel makes generous use of this variable. An example would be to &#8220;time&#8221; timeouts, &#8220;budget&#8221; Interrupt Back-Half handlers&#8217; usage of Processors etc to prevent &#8220;Hogging&#8221;.</p>
<p>The <strong>xtime</strong> variable derives its information from the <strong>jiffies</strong> variable and stores the current time and date; it is a structure of <strong>type timespec</strong> having two fields:</p>
<p><strong>tv_sec</strong>: Stores the number of seconds that have elapsed since midnight of January 1, 1970 (UTC)<br />
<strong>tv_nsec</strong>: Stores the number of nanoseconds that have elapsed within the last second (its value ranges between 0 and 999,999,999)</p>
<p>We also need to blog on back-half handlers. Used in a variety of locations where the non-critical component of Interrupt handling is &#8220;deferred&#8221;, IO, Packet reception, Transmission etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxeco.com/?feed=rss2&#038;p=120</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
