From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "ak70" Newsgroups: gmane.emacs.devel Subject: Re[2]: multi-threaded Emacs Date: Wed, 3 Dec 2008 08:59:09 +0100 Message-ID: <28ea42436516c786f86df564cafe07e3@vanilla.net.mt> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1228298606 13568 80.91.229.12 (3 Dec 2008 10:03:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 10:03:26 +0000 (UTC) Cc: "rms@gnu.org" , "emacs-devel@gnu.org" To: "Giuseppe Scrivano" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 03 11:04:31 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7oap-0000lp-N9 for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 11:04:27 +0100 Original-Received: from localhost ([127.0.0.1]:37828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7oZf-0006TY-E5 for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 05:03:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7oZZ-0006Sr-QV for emacs-devel@gnu.org; Wed, 03 Dec 2008 05:03:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7oZW-0006SD-Q2 for emacs-devel@gnu.org; Wed, 03 Dec 2008 05:03:09 -0500 Original-Received: from [199.232.76.173] (port=34923 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7oZW-0006SA-Hj for emacs-devel@gnu.org; Wed, 03 Dec 2008 05:03:06 -0500 Original-Received: from mail.vanilla.net.mt ([80.71.48.7]:1389) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L7oZS-0000aY-Dw; Wed, 03 Dec 2008 05:03:02 -0500 Original-Received: from vanilla.net.mt by mail.vanilla.net.mt (Vanilla Ice Cream Server) with ESMTP id JTK56210; Wed, 03 Dec 2008 08:59:10 +0100 X-Mailer: IceWarp Mailer 9.3.2 X-Priority: 3 X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-Greylist: delayed 4260 seconds by postgrey-1.27 at monty-python; Wed, 03 Dec 2008 05:02:12 EST X-Greylist: delayed 4277 seconds by postgrey-1.27 at monty-python; Wed, 03 Dec 2008 05:02:29 EST X-Greylist: delayed 4292 seconds by postgrey-1.27 at monty-python; Wed, 03 Dec 2008 05:02:45 EST X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106512 Archived-At: 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 > To: Stefan Monnier > Cc: rms@gnu.org, emacs-devel@gnu.org > Date: 12/02/08 23:41 > Subject: Re: multi-threaded Emacs > > Stefan Monnier 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