* Re[2]: multi-threaded Emacs
@ 2008-12-03 7:59 ak70
2008-12-04 8:45 ` Richard M Stallman
2008-12-04 13:21 ` Stefan Monnier
0 siblings, 2 replies; 6+ messages in thread
From: ak70 @ 2008-12-03 7:59 UTC (permalink / raw)
To: Giuseppe Scrivano; +Cc: rms@gnu.org, emacs-devel@gnu.org
Hi, guys. I have a generic user-level thread library on Linux. Maybe it can help.
The thread system is called SMASH developed by Kurt Debattista in 2001 as his master study in University of Malta.
It uses the two level scheduling model, i.e. we have m user level threads running on top of n kernel threads. If you guys are interested,
I can send you the thesis about it( it is a pdf file of size 1Mb).
A few month ago, I obtained the permission from Kurt to release it under GPL. I did some work on it too for my undergraduate study.
The problems:
1. It is platform dependent. Kurt and I used some x86 assembly language to implement spin locks and lock-free algorithms.
2. It lacks some common features that you would expect in a thread library. For example it has no thread id and when a user-level terminates,
the thread structure will not be destroyed. This is however done on purpose, because our supervisor argued that SMASH should be at the lowest
level so that any fancy(or not so fancy) features should be implemented by other libraries built on top of it.
3. Since it is developed as a academic project, a lot of decisions were made in favor of our study, not production use.
I think it is a good starting point, but it is not for immediate use. So what you guys think? Are you interested?
> -----Original Message-----
> From: Giuseppe Scrivano <gscrivano@gnu.org>
> To: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: rms@gnu.org, emacs-devel@gnu.org
> Date: 12/02/08 23:41
> Subject: Re: multi-threaded Emacs
>
> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>
> > I rarely use multiple terminals, and when I use them, the current
> > restrictions are mostly bearable. OTOH I very often would like to keep
> > using my Emacs while it's byte-compiling some files, or while Gnus is
> > fetching some newsgroup.
>
> This is exactly the problem I had when I first thought of threads.
>
> Do you think we can solve it (at least partially) using a concurrent
> model?
>
> Thanks,
> Giuseppe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: multi-threaded Emacs
2008-12-03 7:59 Re[2]: multi-threaded Emacs ak70
@ 2008-12-04 8:45 ` Richard M Stallman
[not found] ` <87prk8mhg9.fsf@vanilla.net.mt>
2008-12-04 13:21 ` Stefan Monnier
1 sibling, 1 reply; 6+ messages in thread
From: Richard M Stallman @ 2008-12-04 8:45 UTC (permalink / raw)
To: ak70; +Cc: gscrivano, emacs-devel
It could be a useful package to develop further, for general purposes.
I cannot tell whether it might be useful in Emacs because your message
does not address the crucial questions.
It uses the two level scheduling model, i.e. we have m user level
threads running on top of n kernel threads.
Is the distinction between user-level threads and kernel threads
a matter of optimization, or is it a user-level feature?
Under what circumstances does it switch threads?
For the user, how does this differ from pthreads?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: multi-threaded Emacs
2008-12-03 7:59 Re[2]: multi-threaded Emacs ak70
2008-12-04 8:45 ` Richard M Stallman
@ 2008-12-04 13:21 ` Stefan Monnier
1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2008-12-04 13:21 UTC (permalink / raw)
To: ak70; +Cc: emacs-devel@gnu.org, Giuseppe Scrivano, rms@gnu.org
> Hi, guys. I have a generic user-level thread library on Linux.
> Maybe it can help.
Thanks. But note that the problem with Emacs and cuncurrency doesn't
have much to do with the presence or absence of threads libraries.
There are already plenty of libraries implementing threads. The problem
to change Emacs's Lisp and C code so as to be able to take advantage
of them.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-06 21:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 7:59 Re[2]: multi-threaded Emacs ak70
2008-12-04 8:45 ` Richard M Stallman
[not found] ` <87prk8mhg9.fsf@vanilla.net.mt>
[not found] ` <E1L8ZUB-0002x3-VT@fencepost.gnu.org>
2008-12-05 13:27 ` Li Lin
[not found] ` <87prk64ilv.fsf@vanilla.net.mt>
2008-12-05 18:37 ` Giuseppe Scrivano
2008-12-06 21:58 ` Magnus Henoch
2008-12-04 13:21 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).