[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for fields of `struct buffer'

From: Richard Stallman
Subject: Re: Patch for fields of `struct buffer'
Date: Tue, 01 Feb 2011 11:39:46 -0500

    Stefan> AFAICT, none of what he did is done because of preemptive threading.
    Stefan> IOW, I don't think you can do it much more simply, even if you 
    Stefan> a cooperative threading model.

    Yeah, you could.  On a thread-switch, you could unwind all the old
    thread's bindings, then restore the new thread's bindings.

    This would let all the existing C code work without indirections or
    macro trickery; the downsides are that you have to have user-space
    control over thread switching, and thread switching becomes expensive.

That's exactly the implementation I have in mind.  It means that
thread switching is slower, but the other approach slows down
execution within a thread.

With this approach, you pay for threads only when you use them.
With the other, you pay all the time.

If multi-core is used for the machines where each core is also as fast
as can be, pay-if-you-use-threads seems like the best choice.

Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
www.fsf.org, www.gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]