|
Readers Speak OutThis month: Adrian Cockcroft speaks to the threads vs. forking debate; international readers offer advice on working abroad; and feedback on last month's cover story, "Choosing a Scripting Language" |
Mail this article to a friend |
Hi Adrian,
I was just wondering if you could give me the definitive answer -- which is faster, threads or forking?
I have a server process, and I want to process each TCP connection as a separate thread of execution. Speed is of paramount importance.
Cheers,
Matt Johnson
Matt,
Threads. But if you want to have lots of threads or processes waiting
on the same port in Accept, you will need Solaris 2.6.
Accept is a non-atomic library routine in 2.5.1 and an atomic system
call in 2.6. You need extra serialization locking around it before 2.6,
and this is the code path that was tuned to make Web servers go faster in
2.6.
Spawning a new thread is faster than spawning a new process. Keeping a pool
of either is better. Beware of running out of file descriptors with threads.
See the way Netscape Enterprise Server is structured, using both.
Adrian
I'd like to amend some of your answers in October's Column (http://www.sun.com/sunworldonline/swol-10-1997/swol-10-career.html):
Degree or No Degree: You should consider online education. Take University of Phoenix's Web site: http://www.uophx.edu. They offer undergrad degrees as well as Masters specifically for people who travel and are working. I don't think it's a bad idea.
Looking for a First Job: There are companies like Microsoft that make a point of hiring people with wits who are able to learn fast rather than people with experience who are set in their ways.
Finally, I'd like to point out, being a Latin American, that you overlooked the possibility of coming to Mexico, or Central or South America to work and only focused on Europe. You'd be amazed at the great technical working opportunities that are available in our countries.
Best regards,
Alejandro Acevedo
Technical jobs aplenty in the Republic of Ireland
Hello,
Regarding your answer to Dreamer who posed the question, "Would it be possible to work abroad, or am I just dreaming?" There is one exception to the citizens rule -- the Republic of Ireland. With growth at a staggering eight percent per year and unemployment plummeting for each of the last five years and no sign of it stopping, there are jobs aplenty -- especially in the technology field. Just thought I'd let you guys know.
We are especially welcoming to citizens of the USA, whose country provided us with many opportunities during our horror years of mass emigration. My wife is American, but long before we married she was assured by our Department of Justice (Aliens Office) that getting working papers for Americans in the Republic of Ireland is a mere formality once the individual is a professional (i.e., holds an associate or full degree).
Ray O'Leary
An Irish programmer
Cameron,
I thoroughly enjoyed reading your article (http://www.sun.com/sunworldonline/swol-10-1997/swol-10-scripting.html). It was informative, balanced and fair to all concerned.
Thanks for putting it together.
Cheers,
Michael Bell
P.S. But Python still rules.
|
If you have technical problems with this magazine, contact webmaster@sunworld.com
URL: http://www.sunworld.com/swol-11-1997/swol-11-letters.html
Last modified: