0

I'm trying to write a program in C++ which writes characters into a file from 100 chars up to 120.000.000 chars in Linux. Would it be faster if I would try to use multithreading and if yes could you give me some advice some links to useful sites maybe some small examples.

thanks in advance

5
Contributors
8
Replies
9
Views
8 Years
Discussion Span
Last Post by Salem
0

Unless your application could write to multiple files at once, I suspect that multiple threads won't be much help. It would be hard to get different threads to write to different parts of the same file where the parts don't even really exist yet.

0

Actually, even with threading, the hard-drive can still only do one thing at a time. So, you'll likely have one thread blocking on the HD to finish the write from the previous thread before the second thread even gets a chance to do anything.

0

Actually, even with threading, the hard-drive can still only do one thing at a time.

Just out of curiosity: Would this also be true for 2 HD's in RAID 0?

0

Just out of curiosity: Would this also be true for 2 HD's in RAID 0?

absolutely not.... 2 HD's in RAID 0 :)

0

what does RAID 0 mean ?

Click

absolutely not.... 2 HD's in RAID 0 :)

I was just wondering if the HD-controller or the HD was blocking the line :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.