Re: parallell execution
| From: | Zeev Suraski | Date: | Thu, 31 Aug 2000 22:57:25 +0000 |
| Subject: | Re: parallell execution | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31523@lists.php.net to get a copy of this message | ||
That's exactly what ticks are for. Stig discussed them on php-dev lately.
Zeev
On 31 Aug 2000, Manuel Lemos wrote:
> Hello Andi,
>
> On 30-Aug-00 15:00:44, you wrote:
>
> >> > I heard that Perl has (will have?) a pool of interpreters read to run
> >> > scripts in the Apache 2 multi-threaded environment. This means that for
> >> > each Apache process there will be spare interpreters ready to run scripts
> >> > threads.
> >> >
> >> > Anyway, I think that the lack of support to start new script
> >> > processes/threads is one of the remaining things that PHP lacks and in
> >> > some cases makes it an inferior solution when compared to Perl and Java
> >> > servlets.
> >>
> >>I agree. Tcl has a beautifully clean C interface in that respect (at
> >>least it did back in the 7.3 days when I last touched it :-).
> >>
> >>It doesn't sound like this is too far away for PHP. We already
> >>support(?) multithreaded servers, so it's already possible to have
> >>several scripting engines running in a single process. However, usually
> >>when I assume things like this, Zeev or Andi can point out why this
> >>makes hell break loose. :-)
>
> >It is extremely hard to implement it and it would slow things down
> >considerably because we would need to use lots and lots of mutexes in
> >hundreds of places.
> >We did however add ticks support which gives you some kind of ability to do
> >background processing for slow things (i.e. opening sockets) so if it is
> >used wisely it could be used quite nicely.
>
> I'm not sure what you mean by ticks. Anyway, I was not necessarily
> suggesting a true preemptive multi-tasking environment with fork() or
> lightweight threads but rather something that at least would switch between
> PHP execution environment contexts when one of them goes idle, for instance
> while executing blocking operations like I/O operations (files, sockets,
> whatever).
>
>
> Regards,
> Manuel Lemos
>
> Web Programming Components using PHP Classes.
> Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
> --
> E-mail: mlemos@acm.org
> URL: http://www.mlemos.e-na.net/
> PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
> --
>
>
>
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/