473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Re: Parallel multithreading for I/O operation in linux ?

On 11 Jun 2008 at 19:26, jurij wrote:
Utilizing the multithreading schema, we were awaiting more optimized
time behavior but could not see it. Obviously, during the "reader" is
doing its job, it is blocked; in this time the scheduler could switch
over to "processor" to allow him to process data. In this case we
would have optimized time-behavior.
If you're using user-level threads (e.g. pthreads) and doing synchronous
I/O then it's likely that the whole process is being blocked by the
kernel until the I/O system call returns. To be honest, on a
uniprocessor system you're not likely to get much help from threading in
the situation you describe, even if you do complicated things to get
asynchronous I/O.

Jun 27 '08 #1
1 3071
Antoninus Twink wrote:
Jurij wrote:
>Utilizing the multi-threading schema, we were awaiting more optimized
time behavior but could not see it. Obviously, during the "reader" is
doing its job, it is blocked; in this time the scheduler could switch
over to "processor" to allow him to process data. In this case we
would have optimized time-behavior.

If you're using user-level threads (e.g. pthreads) and doing synchronous
I/O then it's likely that the whole process is being blocked by the
kernel until the I/O system call returns.
NPTL (which has been the default library for years) is a 1x1 threads
library.

http://en.wikipedia.org/wiki/Native_...Thread_Library
http://www.kegel.com/c10k.html#threads.nptl
http://lwn.net/Articles/10465/

One thread sleeping does not stall the entire process group.

You should have cross-posted to comp.os.linux.development.apps to
give participants a chance to comment.
To be honest, on a uniprocessor system you're not likely to get much
help from threading in the situation you describe, even if you do
complicated things to get asynchronous I/O.
I disagree. His first thread (producer) is pure I/O while his second
thread is pure CPU (consumer).
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Yuancai \(Charlie\) Ye | last post by:
Hi, All: I am happy to annouce that we have formally released our latest SocketPro version 4 at www.udaparts.com, an advanced remoting framework written from batching/queue, asynchrony and...
10
by: Joshua Nussbaum | last post by:
I came up with what I think is a good idea for making multithreading programming easier in any .NET language. I dont know where else to post it, so I'll try here. ..NET 2.0 adds the capability...
4
by: Joseph Suprenant | last post by:
I am looking to read a byte or write a byte on the parallel port in linux. I am using red hat 7.3. I tired using this but i couldnt get anywere. { unsigned char value; __asm__ volatile ("inb...
47
by: mihai | last post by:
What does the standard say about those two? Is any assurance that the use of STL is thread safe? Have a nice day, Mihai.
3
by: Warren | last post by:
I'm having some difficulty getting controls to work with multithreading. Basically, I want to begin a long running operation on another thread when a button is clicked, and then disable that button...
16
by: Robert Zurer | last post by:
Can anyone suggest the best book or part of a book on this subject. I'm looking for an in-depth treatment with examples in C# TIA Robert Zurer robert@zurer.com
4
by: Soren | last post by:
Hi, I want to control some motors using the parallel port.. however, my laptop does not have any parallel ports (very few do). What I do have is a USB->Parallel converter... I thought about...
1
by: Gianni Mariani | last post by:
jurij wrote: .... Possible answers: a) You problem is I/O bound. Meaning that the time it takes to read and write is far more costly that the processing. b) You have a bug and you're not...
3
by: John | last post by:
I have a program that needs to run on a regular basis that looks at a queue table in my database. If there are items in the queue database I need to grab the data from the database and pass it to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.