<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: semophore doubt</title>
	<atom:link href="https://www.emblogic.com/blog/05/semophore-doubt/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog/05/semophore-doubt/</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Mon, 07 Oct 2013 04:00:03 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>By: Vaibhav Singh</title>
		<link>https://www.emblogic.com/blog/05/semophore-doubt/#comment-747</link>
		<dc:creator><![CDATA[Vaibhav Singh]]></dc:creator>
		<pubDate>Mon, 07 May 2012 10:23:27 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=2667#comment-747</guid>
		<description><![CDATA[If you check the kernel Sources  the semaphore structure contains only three members 1-Spinlock 2-unsigned int count 3-struct list_head *list_head;

There is a comment above this structure that you cannot access the members of this structure directly .

And the value u give as second argument of sema_init() is jst decide the maximum length of the list_head type link list . So the value (2nd argument of sema_init()) does not define the processes which can access the critical section . The value defines the maximum no. of processes that are maintained by that structure . It also includes the spinlock locking mechenism. And this is the main reason tht semaphore is a heavyweight synchronisation technique .]]></description>
		<content:encoded><![CDATA[<p>If you check the kernel Sources  the semaphore structure contains only three members 1-Spinlock 2-unsigned int count 3-struct list_head *list_head;</p>
<p>There is a comment above this structure that you cannot access the members of this structure directly .</p>
<p>And the value u give as second argument of sema_init() is jst decide the maximum length of the list_head type link list . So the value (2nd argument of sema_init()) does not define the processes which can access the critical section . The value defines the maximum no. of processes that are maintained by that structure . It also includes the spinlock locking mechenism. And this is the main reason tht semaphore is a heavyweight synchronisation technique .</p>
]]></content:encoded>
	</item>
</channel>
</rss>
