473,378 Members | 1,343 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,378 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 3064
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.