From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 62A52BC37 for ; Thu, 28 Jan 2010 19:39:51 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An0EAJ1oYUtQRFuwX2dsb2JhbACbQBcLCgQWvhWEPAQ X-IronPort-AV: E=Sophos;i="4.49,361,1262559600"; d="scan'208";a="42388465" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP; 28 Jan 2010 19:39:51 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1NaZHS-000276-FE; Thu, 28 Jan 2010 18:39:50 +0000 Date: Thu, 28 Jan 2010 18:39:50 +0000 To: Konstantin Tcholokachvili Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocaml implementation and low level details Message-ID: <20100128183950.GA7701@annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; ocaml:01 0100,:01 ocaml:01 ocaml's:01 runtime:01 runtime:01 28,:98 garbage:01 garbage:01 wrote:01 heap:01 heap:01 caml-list:01 functions:01 minor:01 On Thu, Jan 28, 2010 at 01:42:15PM +0100, Konstantin Tcholokachvili wrote: > I am writing an operating system kernel and I am considering the idea of > rewritting it in Ocaml or make a wrapper. > As I don't know how Ocaml is implemented in detail so I have the following > question: > If want to code in Ocaml without using the garbage collector, will I be able > to use my own multithreading implementation or will I be limited by Ocaml's > global lock? You're probably better off not using the current runtime, but instead implementing enough of the runtime based on the functions that the code generator needs. But reading the rest of the thread it sounds like you really need to look deeply at the current implementation first before you are in a position to make any decision (luckily the runtime of OCaml is not hard to understand, and is mostly written in C). Asking if one can code in OCaml "without using the garbage collector" doesn't really make any sense as a question, since at least the minor heap is a fundamental concept in the language. And the "global lock" just prevents reentrancy in the current implementation of the GC -- you can easily use one minor heap per thread, although that is likely to just push the problem elsewhere. Rich. -- Richard Jones Red Hat