Re:What to know detail about why Squid use single process.

From: <maer727@dont-contact.us>
Date: Tue, 23 Apr 2002 18:51:51 +0800 (CST)

Thanks, Basile pal!

Why you say mono-thread decision is very heavy constraining, can you
give me a more detailed description? Or, if it is boring and wasting
time, can you introduce me some articles about the topic?

Another question, do you mean that if the Squid project starts today,
the group will choose multi-process? Do you have some articles that
compare muiti-thread with single-thread?

Best regards,
George Ma

----- Original Message -----
From: STARYNKEVITCH Basile
To: maer727@sohu.com
Cc: squid-dev@squid-cache.org
Subject: What to know detail about why Squid use single process.
Sent: Tue Apr 23 15:58:44 CST 2002

> >>>>> "maer727" == maer727 <maer727@sohu.com> writes:
>
> maer727> Hi, pals! I read from Programming Guide that Squid is a
> maer727> single process application. I also learn the shortcoming
> maer727> of multi-process (multi-thread). Here is what the
> maer727> Programming Guide says,
>
> maer727> //////////////////////////////////////////////////////////////////////
> maer727> Squid does not use a ``threads package'' such has
> maer727> Pthreads. While this might be easier to code, it suffers
> maer727> from portability and performance problems. Instead Squid
> maer727> maintains data structures and state information for each
> maer727> active request.
> maer727> //////////////////////////////////////////////////////////////////////
>
>
> I am not really a pthread expert (but knows it a bit) but I'll guess
> that the single-thread decision was made long time ago. It could be
> the case that if an opensource HTTP cache solution was started today,
> it would make very different decisions on multi-threading -and even on
> the choice of the programming language. In particular, Posix
> (including Posix threads) seems a much broader system specification
> today than ten years ago (with the huge exception of Microsoft systems
> which I do not really know).
>
> The mono-thread decision is very heavy constraining, and nearly
> requires the callback (I would even name it "dumb continuation passing")
> programming style.
>
> But I am not really a Squid expert.
>
>
> N.B. Any opinions expressed here are only mine, and not of my organization.
> N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.
>
> ---------------------------------------------------------------------
> Basile STARYNKEVITCH ---- Commissariat ?l Energie Atomique * France
> DRT/LIST/DTSI/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX
> phone:+33 1,6908.6055; fax: 1,6908.8395 home: 1,4665.4553; mobile: 6,8501.2359
> work email: Basile point Starynkevitch at cea point fr
> home email: Basile at Starynkevitch point net
>
Received on Tue Apr 23 2002 - 04:51:57 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:18 MST