Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MT server side app book advice

5 views
Skip to first unread message

dan

unread,
May 23, 2005, 12:20:04 PM5/23/05
to
Hi

Can anyone recommend any books regarding developing mutlithreaded server
side applications for Windows XP server or linux.

Thanks

dan


Mikhail Polatov

unread,
May 23, 2005, 10:13:45 PM5/23/05
to
"dan" <danny_...@systemc.com> writes:

I'd start with Programming with POSIX(R) Threads by David R. Butenhof
(ISBN: 0201633922).

Then:

Microsoft Windows Internals, Fourth Edition (ISBN: 0735619174).
Windows System Programming, Third Edition (ISBN: 0321256190).
Unix Network Programming, Volumes 1 and 2 (ISBN: 0131411551,
0130810819).

The last two books are focused solely on UNIX, but they will give you
some ideas/patterns/techniques how to write back-end applications
regardless of a platform you are using.

>
> Thanks
>
> dan
>

--
Mikhail Polatov

dan

unread,
May 24, 2005, 10:32:26 AM5/24/05
to
Thanks for all the info! Think I'll buy a couple (Just wish they weren't
all so expensive!)

Dan


"Mikhail Polatov" <mpol...@meta-comm.com> wrote in message
news:umzqlc...@meta-comm.com...

Uenal Mutlu

unread,
May 24, 2005, 10:59:33 AM5/24/05
to
"dan" <danny_...@systemc.com> wrote

> Thanks for all the info! Think I'll buy a couple (Just wish they weren't
> all so expensive!)
>
>
> "Mikhail Polatov" <mpol...@meta-comm.com> wrote in message
>
> > "dan" <danny_...@systemc.com> writes:
> >
> >> Can anyone recommend any books regarding developing mutlithreaded
> >> server side applications for Windows XP server or linux.
> >
> > I'd start with Programming with POSIX(R) Threads by David R. Butenhof
> > (ISBN: 0201633922).

I have not read his book, but I've participated in some discussions with
the author in this newsgroup, and I'm afraid his views on thread programming
are not uptodate, some may even say old- or odd-style.
He is practically saying that multithreading on a single CPU would not
make any sense. He's saying one would need one CPU per thread. When
I asked him how he would serve 1000 simultanous clients, ie. whether he
would use a server with 1000 CPU's to do the job, he unfortunately refused
to answer. So, I believe you would much be disappointed of the book.
I would suggest a newer and a more modern book on threads programming.
I think the following free book and examples from Sun will give you
more than the above one: http://docs.sun.com/app/docs/doc/805-5080 (HTML version)
http://docs-pdf.sun.com/805-5080/805-5080.pdf (PDF version)

Sergei Organov

unread,
May 24, 2005, 11:37:29 AM5/24/05
to
"Uenal Mutlu" <52000108...@t-online.de> writes:

> "dan" <danny_...@systemc.com> wrote
> > Thanks for all the info! Think I'll buy a couple (Just wish they weren't
> > all so expensive!)
> > "Mikhail Polatov" <mpol...@meta-comm.com> wrote in message
> > > "dan" <danny_...@systemc.com> writes:
> > >
> > >> Can anyone recommend any books regarding developing mutlithreaded
> > >> server side applications for Windows XP server or linux.
> > >
> > > I'd start with Programming with POSIX(R) Threads by David R. Butenhof
> > > (ISBN: 0201633922).
>
> I have not read his book, but I've participated in some discussions with
> the author in this newsgroup, and I'm afraid his views on thread programming
> are not uptodate, some may even say old- or odd-style.

The fact that you didn't care to understand (or just lack the brain
power to) what exactly he is saying makes his writing neither old- nor
odd-style, sorry.

Besides, being born in USSR, I still remember those unfortunate for many
authors old days that your phrase "I have not read his book, but..."
immediately reminded. The rest of the phrase was usually something like
"..., but I condemn what he wrote."

> He is practically saying that multithreading on a single CPU would not
> make any sense.

He didn't say it.

> He's saying one would need one CPU per thread.

He didn't say it.

> When I asked him how he would serve 1000 simultanous clients, ie.
> whether he would use a server with 1000 CPU's to do the job, he
> unfortunately refused to answer.

As he didn't say what you believe he said, your question just didn't
make any sense, so I'm not surprised you've got no answer. Besides, you
don't seem to respect any answers that don't match your own opinion, so
why bother to answer?

--
Sergei.

Maciej Sobczak

unread,
May 24, 2005, 11:20:06 AM5/24/05
to
Uenal Mutlu wrote:

>>>I'd start with Programming with POSIX(R) Threads by David R. Butenhof
>>>(ISBN: 0201633922).
>
> I have not read his book, but I've participated in some discussions with
> the author in this newsgroup, and I'm afraid his views on thread programming
> are not uptodate

Hands down...

You see, the author of this book actually belongs to the narrow group of
people who... define threading standards.

By stating that he is not up to date you probably put yourself in the
same position as if you claimed that Bjarne Stroustrup is not up to date
wrt C++.

Be prepared for a loooong list of responses.

> So, I believe you would much be disappointed of the book.

This book is a must-have. Well, it is POSIX-oriented (of course), but
the book is of high value even under Windows.

The fact that you have not read it is a minor issue that is easy to fix
(just read it). But by claiming that the book is bad *without* reading
it first is... hands down.

--
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/

Mikhail Polatov

unread,
May 24, 2005, 12:39:13 PM5/24/05
to
"Uenal Mutlu" <52000108...@t-online.de> writes:

> "dan" <danny_...@systemc.com> wrote
>> Thanks for all the info! Think I'll buy a couple (Just wish they weren't
>> all so expensive!)
>>
>>
>> "Mikhail Polatov" <mpol...@meta-comm.com> wrote in message
>>
>> > "dan" <danny_...@systemc.com> writes:
>> >
>> >> Can anyone recommend any books regarding developing mutlithreaded
>> >> server side applications for Windows XP server or linux.
>> >
>> > I'd start with Programming with POSIX(R) Threads by David R. Butenhof
>> > (ISBN: 0201633922).
>
> I have not read his book, but I've participated in some discussions with
> the author in this newsgroup, and I'm afraid his views on thread programming
> are not uptodate, some may even say old- or odd-style.

If you haven't read the book, you cannot claim that it is good or bad.

I cannot say that the book gives you the complete picture of the
concurrent programming and the problems associated with it, and allows
you to start writing high-performance back-end applications. But the
true value of this book is a set of concepts and patterns about
multithreading and concurrent programming, so you can start thinking
about it and go deeper to understand other aspects associated with the
domain.

> He is practically saying that multithreading on a single CPU would not
> make any sense. He's saying one would need one CPU per thread. When
> I asked him how he would serve 1000 simultanous clients, ie. whether he
> would use a server with 1000 CPU's to do the job, he unfortunately refused
> to answer. So, I believe you would much be disappointed of the book.

IMHO, if the thread is CPU bound, it really doesn't make any sense to
have more of them on the same CPU. You have not described you vision
on this problem so it is hard to judge about the right design.


> I would suggest a newer and a more modern book on threads
> programming. I think the following free book and examples from Sun
> will give you more than the above one:
> http://docs.sun.com/app/docs/doc/805-5080 (HTML version)
> http://docs-pdf.sun.com/805-5080/805-5080.pdf (PDF version)

Good source, but mostly repeats the content of the book mentioned
above.

I believe this document is an updated version of the document you have
pointed to.

http://docs-pdf.sun.com/816-5137/816-5137.pdf

I'd add one more link:

http://www.serpentine.com/~bos/threads-faq/

There is a section regarding books on design and implementation of
thread libraries on various operating systems with multiprocessor
support.

>
>> > Then:
>> >
>> > Microsoft Windows Internals, Fourth Edition (ISBN: 0735619174).
>> > Windows System Programming, Third Edition (ISBN: 0321256190).
>> > Unix Network Programming, Volumes 1 and 2 (ISBN: 0131411551,
>> > 0130810819).
>> >
>> > The last two books are focused solely on UNIX, but they will give you
>> > some ideas/patterns/techniques how to write back-end applications
>> > regardless of a platform you are using.
>

--
Mikhail Polatov

Joe Seigh

unread,
May 24, 2005, 1:16:51 PM5/24/05
to
On Tue, 24 May 2005 17:20:06 +0200, Maciej Sobczak <no....@no.spam.com> wrote:

> Uenal Mutlu wrote:
>
>>>> I'd start with Programming with POSIX(R) Threads by David R. Butenhof
>>>> (ISBN: 0201633922).
>>
>> I have not read his book, but I've participated in some discussions with
>> the author in this newsgroup, and I'm afraid his views on thread programming
>> are not uptodate
>
> Hands down...
>
> You see, the author of this book actually belongs to the narrow group of
> people who... define threading standards.

The standard isn't the same thing as the application of the standard. It
doesn't necessarily follow that he is an expert in the application of the
standard. Or necessarily that he's not.


>
> By stating that he is not up to date you probably put yourself in the
> same position as if you claimed that Bjarne Stroustrup is not up to date
> wrt C++.

By your definition, Stroustrup is the ultimate expert in everything that
can be written in C++.


>
> Be prepared for a loooong list of responses.

Yes, be prepared. :)

--
Joe Seigh

When you get lemons, you make lemonade.
When you get hardware, you make software.

David Butenhof

unread,
May 24, 2005, 1:48:54 PM5/24/05
to
Uenal Mutlu wrote:
> "dan" <danny_...@systemc.com> wrote

>
>>>I'd start with Programming with POSIX(R) Threads by David R. Butenhof
>>>(ISBN: 0201633922).
>
> I have not read his book, but I've participated in some discussions with
> the author in this newsgroup, and I'm afraid his views on thread programming
> are not uptodate, some may even say old- or odd-style.
> He is practically saying that multithreading on a single CPU would not
> make any sense. He's saying one would need one CPU per thread. When
> I asked him how he would serve 1000 simultanous clients, ie. whether he
> would use a server with 1000 CPU's to do the job, he unfortunately refused
> to answer. So, I believe you would much be disappointed of the book.
> I would suggest a newer and a more modern book on threads programming.
> I think the following free book and examples from Sun will give you
> more than the above one: http://docs.sun.com/app/docs/doc/805-5080 (HTML version)
> http://docs-pdf.sun.com/805-5080/805-5080.pdf (PDF version)

Uenal, you've crossed the line from being narrow-minded and annoying to
being truly (and apparently deliberately) offensive.

Rather than reply in kind (and the temptation is almost irresistable) I
will simply say that such a generic and content-free review of a book
you claim not to have even read is completely consistent with every
ignorant and overly confident opinion you've expressed in this
newsgroup. Your criticism quoted above, by the way, stands as proof that
you either haven't read or haven't understood anything we've told you.

I suggest that anyone inclined to pay attention to Uenal's ramblings
should go back and skim the various discussions to judge for themselves.

Ooops... I really did mean to avoid "replying in kind". Really. I just
couldn't think of any other response that was even moderately
appropriate to this tirade. But I will at least end it here after
deleting the following several paragraphs of additional commentary and
details...

--
Dave Butenhof, David.B...@hp.com
HP Utility Pricing software, POSIX thread consultant
Manageability Solutions Lab (MSL), Hewlett-Packard Company
110 Spit Brook Road, ZK2/3-Q18, Nashua, NH 03062

Chris Thomasson

unread,
May 24, 2005, 2:09:56 PM5/24/05
to
> I have not read his book

[...]

> So, I believe you would much be disappointed of the book.


FU#$#CK&IN#@$G MORON!!!

LOL

:)


Maciej Sobczak

unread,
May 24, 2005, 2:34:07 PM5/24/05
to
Joe Seigh wrote:

>> You see, the author of this book actually belongs to the narrow group of
>> people who... define threading standards.
>
> The standard isn't the same thing as the application of the standard. It
> doesn't necessarily follow that he is an expert in the application of the
> standard. Or necessarily that he's not.

Sure. Sure. Of course.

>> By stating that he is not up to date you probably put yourself in the
>> same position as if you claimed that Bjarne Stroustrup is not up to date
>> wrt C++.
>
> By your definition, Stroustrup is the ultimate expert in everything that
> can be written in C++.

No, the gossip goes that even he doesn't think like this about himself...

But I'd never claim that he is not up to date just because I don't agree
with (or understand) him. ;)

And to make this post at least a little bit on-topic, I will repeat that
the "Programming with POSIX Threads" is a very good book, also valuable
if you program for Windows.


>> Be prepared for a loooong list of responses.
>
> Yes, be prepared. :)

--

doug

unread,
May 24, 2005, 3:09:05 PM5/24/05
to

"David Butenhof" <david.b...@hp.com> wrote in message
news:aOJke.5952$Bl3...@news.cpqcorp.net...

This Uenal guy is a nut.

Smells like a politician - can't understand real life, so makes crap up, and
tries to rewrite the rulebook for the dumb.

I'd llike to see those extra paragraphs!


Dragan Cvetkovic

unread,
May 24, 2005, 3:14:38 PM5/24/05
to
"doug" <no...@nowhere.co.uk> writes:

> "David Butenhof" <david.b...@hp.com> wrote in message
> news:aOJke.5952$Bl3...@news.cpqcorp.net...

>> Ooops... I really did mean to avoid "replying in kind". Really. I just

>> couldn't think of any other response that was even moderately appropriate
>> to this tirade. But I will at least end it here after deleting the
>> following several paragraphs of additional commentary and details...

>


> I'd llike to see those extra paragraphs!

Me too. In the next edition of _the book_ :-)

Dragan


--
Dragan Cvetkovic,

To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

!!! Sender/From address is bogus. Use reply-to one !!!

ster

unread,
May 24, 2005, 3:55:16 PM5/24/05
to
Dragan Cvetkovic wrote:
> "doug" <no...@nowhere.co.uk> writes:
>
>
>>"David Butenhof" <david.b...@hp.com> wrote in message
>>news:aOJke.5952$Bl3...@news.cpqcorp.net...
>
>
>>>Ooops... I really did mean to avoid "replying in kind". Really. I just
>>>couldn't think of any other response that was even moderately appropriate
>>>to this tirade. But I will at least end it here after deleting the
>>>following several paragraphs of additional commentary and details...
>
>
>>I'd llike to see those extra paragraphs!
>
>
> Me too. In the next edition of _the book_ :-)
>
> Dragan
>
>

Well at least there'll be something worth reading then, apparently the
threading discussion is terrible...

David Schwartz

unread,
May 24, 2005, 5:03:00 PM5/24/05
to

"Uenal Mutlu" <52000108...@t-online.de> wrote in message
news:d6vf4c$u7k$05$1...@news.t-online.com...

> I have not read his book, but I've participated in some discussions with
> the author in this newsgroup, and I'm afraid his views on thread
> programming
> are not uptodate, some may even say old- or odd-style.
> He is practically saying that multithreading on a single CPU would not
> make any sense. He's saying one would need one CPU per thread. When
> I asked him how he would serve 1000 simultanous clients, ie. whether he
> would use a server with 1000 CPU's to do the job, he unfortunately refused
> to answer. So, I believe you would much be disappointed of the book.
> I would suggest a newer and a more modern book on threads programming.
> I think the following free book and examples from Sun will give you
> more than the above one: http://docs.sun.com/app/docs/doc/805-5080 (HTML
> version)
> http://docs-pdf.sun.com/805-5080/805-5080.pdf (PDF version)

Holy cow! You advise against the book you have not read because the
author wouldn't answer your question?

As a third party observer, it is my opinion that Dr. Buthenhof has given
you *much* more of a reply than you deserve, given your unwillingness to
even spend the time to understand anyone else's view.

By the way, to answer your questions:

1) Multi-threading on a single CPU makes plenty of sense. Other threads
can continue running if one thread gets blocked on a page fault or some
other kind of I/O. Multi-threading may also make the design cleaner in some
cases.

2) You do want one thread per CPU, at least, if your goal is to be able
to make use of all the CPUs. Obviously, with five CPUs and four threads, you
can't use all the CPUs (unless you manage to get some kernel code that is
multi-threaded to do it for you). But you want get all the CPUs running
application code.

3) You don't need more CPUs or more threads to get more work done. You
just need more CPUs to get more work done per unit time, and you may need
more threads to keep more CPUs busy or pend more I/Os. But an increased
number of clients does not translate into an increased need for threads,
unless more I/Os need to be pended or more CPUs kept busy, which is not
normally the case. An increased number of clients does not translate into an
increased need for CPUs unless more clients means more computation is needed
and the CPUs are the limiting factor.

DS


Giancarlo Niccolai

unread,
May 25, 2005, 8:01:48 AM5/25/05
to
Chris Thomasson wrote:

For the chronicle, Chris (aka SenderX, if I am not wrong), had polite and
enlightening opinion differences with Dave (about lock-free algos). The
fact that he is defending Dave quite promptly should say something about
the impression that Mr. Butenhof makes on ppl politely discussing with him.

Giancarlo.

0 new messages