[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Are there plans for a multi-threaded Emacs?
From: |
Ted Zlatanov |
Subject: |
Re: Are there plans for a multi-threaded Emacs? |
Date: |
Thu, 04 Dec 2003 08:05:15 -0500 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) |
On Thu, 04 Dec 2003, address@hidden wrote:
> What about simply having a single mutex for everything? It's
> essentially always held, and a thread only relinquishes it to do
> blocking operations. Immediately afterwards it reacquires the lock.
> I take it this would essentially be the same as your starting point,
> where all functions are synchronous - nothing runs at the same time
> as anything else. There are however only small benefits to go
> further:
>
> o To be able to run several threads simultaneously in multicpu or
> hyperthreaded systems.
> o To get OS level preemption between threads.
Those two benefits make a big difference. Today's Pentiums have
hyper-threading technology, so even a single processor can act as
two. The best cooperative multitasking can't make use of multiple
processors as well as premptive multithreading. Cooperative
multitasking definitely has benefits - time-critical applications for
instance, but I don't think that applies to Emacs.
> I see these benefits with this model compared to a "fully"
> multithreaded variant:
>
> o Fairly small changes in the C code.
> o No significant change in the elisp execution model, at least not
> if preemption is avoided.
> o Little overhead in locking - there's no fine grained locking on
> individual data structures.
I agree with all those. Converting a single-threaded application to
multithreaded, especially one as complex as Emacs, is a daunting
task. I think it's worthwhile.
Ted
- Re: Are there plans for a multi-threaded Emacs?, (continued)
Re: Are there plans for a multi-threaded Emacs?, Ted Zlatanov, 2003/12/02
Re: Are there plans for a multi-threaded Emacs?, Richard Stallman, 2003/12/03
- Re: Are there plans for a multi-threaded Emacs?, Ted Zlatanov, 2003/12/03
- Re: Are there plans for a multi-threaded Emacs?, Kim F. Storm, 2003/12/04
- Re: Are there plans for a multi-threaded Emacs?, Nic Ferrier, 2003/12/04
- non-blocking sockets (was Re: Are there plans for a multi-threaded Emacs?), Nic Ferrier, 2003/12/04
- Re: non-blocking sockets (was Re: Are there plans for a multi-threaded Emacs?), Kim F. Storm, 2003/12/05
Re: Are there plans for a multi-threaded Emacs?, Ted Zlatanov, 2003/12/04
Re: Are there plans for a multi-threaded Emacs?, Stefan Monnier, 2003/12/04
Re: Are there plans for a multi-threaded Emacs?, Ted Zlatanov, 2003/12/04