On Thu, Oct 12, 2006 at 10:00:21AM +0100, Jeroen Massar wrote: > Girish Venkatachalam wrote: > [..] > > You should take a look at these links. > > > > http://www.softpanorama.org/People/Ousterhout/Threads/index.shtml > > Note that those slides are from 1995, that is over 10 years ago. You do > realize that a lot happens in 10 years in the computing industry? > > It is indeed a given fact that programming with threading and locking is > quite a nightmare, still it is a good tool to solve quite a number of > issues. What has happened in the last 10 years?
To make threading become more important? Hyperthreaded CPUs maybe! But understand that I am talking about user level threading, not really about kernel threading... > > > http://www.monkey.org/~provos/libevent/ > > Using events is nice, but it depends also on what you need to achieve. > Events (or messages as they call them on Windows, funny to see BSD folks > pushing something that Windows already have for years ;) don't let you > run nicely and concurrently on multiple cpu's, unless you let each one > of them take events from the queue and handle them of course. But then > you are still doing threading and using the events as the locking > mechanism. Slide 14 in the above set says it all actually. > > > Like many things in computing it just depends on what one is most > comfortable with and using the right tool for the right job. One time > that is events, the other time that is threads... > > Greets, > Jeroen > Disagreed. Your points are either not valid enough or not clear enough for me. Can you please give me anecdotes to support your viewpoint? Why couldn't Henning Brauer go in for threads for implementing BGPD? Do you think there can be a better example? Now, don't tell me it is bcoz OpenBSD does not have proper threading support. I won't buy that argument. I agree that threading is common on Windoze platforms with good reason. I am not debating that. Most of the beautiful UNIX programs that give remarkable performance are all either single process or multi process, not multithreaded. Apache 1.3.x? What about the pre forking model? What about squid proxy? Couldn't they have made it multi threaded? It is actually a single process. If you are interested in stability and maintainability of your code, dont touch threads with a ten foot bargepole.... regards, Girish