LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-26-2010, 11:37 AM   #1
vhn
LQ Newbie
 
Registered: Nov 2009
Posts: 6

Rep: Reputation: 0
Process going to "D" state because of semaphore


I've a device driver that provides two ioctl calls: one for writing to the device & the other for reading from the device.
Both these ioctl cases use the same semaphore for synchronization.
There is a read process that invokes the read ioctl every 1 sec. There is a write process that invokes write ioctl pretty fast comparatively (3-4 times a second).
My observation is that after sometime, the read process goes to the "D" (uninterrupted sleep state). After inserting debug messages I'm seeing that it goes to this state after invoking the "down" system call at the beginning of read ioctl. And it never recovers.
The write process does not stop, it runs continuously.
If write process is killed, then also read process does not recover.

Same behavior is seen even when down_trylock and down_interruptible function calls are used.

Any hints?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need solution to "failed to fork PTY" and "error creating the child process" problems Gnusboy Linux - Newbie 4 01-02-2010 07:54 AM
"TOP" Command keeps going to "stopped" state mudtoe Linux - Newbie 3 03-09-2009 11:15 PM
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
How to read "identify" button press event, or state of "identify" blue led with IPMI? iav Linux - Server 0 01-27-2009 01:13 PM
ALSA + slmodemd + "semaphore not ready" + no modem noise cyberjun Linux - Laptop and Netbook 21 04-06-2005 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration