Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Threading

Name: Anonymous 2009-08-26 3:42

I'm starting to learn about concurrency programming/threading and was wondering about some good resources to start this journey. Concurrency requires a different method of thinking about problems than standard serial code, I'm aware.

So far, I've picked up The Art of Concurrency from O'Reilly and I've been Googling a little (but to not much avail, it seems that threading isn't much of a hobby among programmers and I can see why).

Applications of threading that I would be interested in would be things like timer threading for network timeouts and keeping all the code aware of this happening, design patterns, algorithms, etc. Thank you in advance.

Name: Anonymous 2009-08-26 12:55

>>16
Please do, multiprocessing works when your task is stupidly parallel, but not are problems are that simple.

Name: Anonymous 2009-08-26 12:58

>>17
I invite you to come up with a single thing multithreading can do multiprocessing cannot.

Most often I see people trying to force threading where it doesn't belong in the first place, like for asynchronous GUIs (spoiler: interrupts have been around for longer than threads).

Name: Anonymous 2009-08-26 13:51

Process creation is expensive. Why fork and set up some stupid IPC when I can make another thread?

Name: Anonymous 2009-08-26 13:57

>>19
With copy-on-write it's less expensive than you might think.

Name: Anonymous 2009-08-26 15:49

What's really the difference between multithreading and multiprocessing? I mean on the OS level.

Name: Anonymous 2009-08-26 15:52

>>19
If process creation is (much) more expensive than thread creation, your OS sucks.
In practice, of course, it isn't noticeable even for the worst offenders (that is, Windows and Solaris).

Name: Anonymous 2009-08-26 15:55

>>21
Varies. Basically and oversimplifiedly, the main difference tends to be that threads share address space.

Name: Anonymous 2009-08-26 18:31

>>18
Just because you can do something a certain way, does not mean it's an effective or good way to do it. The issue isn't whether or not multiprocessing CAN do the things that threading can do.

And you want to talk about religion in threading? It seems you subscribe to an alternate religion. >>17-san asked you to explain why multiprocessing offers advantages over threading. I believe it's possible that WHBT.

>>15
1/10. You gave up your subtlety in exchange for force. Next time, be less forceful and slightly more vague.

>>10
Helpful resource, thank you.

Name: Anonymous 2009-08-26 20:29

i use select() and just have one thread.

Name: Real Man 2009-08-26 20:56

>>25
We real men, we use select()

Name: Anonymous 2009-08-26 23:44

theres alot of really helpful stuff at http://beej.us/guide/ at least if you're coding in C in a unix environment (why would you want anything else?)

Name: Anonymous 2009-08-27 0:25

>>24
>>17-san asked you to explain why multiprocessing offers advantages over threading.
For one thing, a lack of implicit shared state, which eliminates a whole class of bugs right off the bat.

Name: SkiddieKript !!u73mm2xOxI8U4N2 2009-08-27 1:11

ignore the mutex shit, its useless

Name: Anonymous 2009-08-27 8:28

>>22
But both are managed by the OS, right?

>>18
interrupts have been around for longer than threads
I don't see how you would use interrupts for managing GUIs, unless you're talking about different interrupts than I know about.

Name: Anonymous 2009-08-27 10:11

>>30
But both are managed by the OS, right?
In the sense that pretty much everything is managed by the OS. User-level threads (including pthreads in ``compliant'' implementations; that is, not Linux, which fakes it with processes) aren't even necessarily managed by the OS, though, and a pain in the ass in general.

I don't see how you would use interrupts for managing GUIs, unless you're talking about different interrupts than I know about.
I must be. I'm talking about the interrupts people who know what they're talking about use.

Name: Anonymous 2009-08-27 16:57

>>31
I'm talking about the interrupts people who know what they're talking about use.
Why are you mean to me :<

Name: Anonymous 2009-08-27 21:00

>>31
You alone know more than all the development firms and standards bodies that are backing these methods. Clearly.

Trolling wasn't the point of this thread, you know.

There are a few Google tech talks on youtube about threading from 2007.

http://www.youtube.com/watch?v=k5FltpgKcVk
http://www.youtube.com/watch?v=3JUXPaovfzw

And probably a couple more, I don't know.

Name: Anonymous 2009-08-28 2:45

http://7chan.org/pr/

Far less trolls, and pics!

Name: Anonymous 2009-08-28 3:12

Maybe you should read Structure and Interpretation of Computer Programs.

Name: Anonymous 2009-08-28 4:00

>>33
The point of standards bodies isn't to promote good technologies. It's to standardize. ``Development firms'' are also pushing Sepples and Java.
Your appeal to authority has been noted and dismissed.

Name: Anonymous 2009-08-28 4:45

>>34


    http://anontalk.org/

    Far less trolls, and pics!

Name: Anonymous 2009-08-28 4:47

7chan is the prog equiv of anontalk: useless fucks spamming

Name: Anonymous 2009-08-28 5:24

>>38
but 7chan are more than one guy

Name: Anonymous 2009-08-28 9:56

>>36
Apparently, you know nothing about standards, considering that you use faggot quotes.

Name: Anonymous 2010-11-02 21:19

Name: Anonymous 2011-02-04 18:52

Name: Anonymous 2011-02-17 20:14

that's cool and all, but check 'em

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List