From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA20728; Wed, 14 Apr 2004 19:07:42 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA20499 for ; Wed, 14 Apr 2004 19:07:41 +0200 (MET DST) Received: from mallaury.noc.nerim.net (smtp-103-wednesday.noc.nerim.net [62.4.17.103]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3EH7eYM029853 for ; Wed, 14 Apr 2004 19:07:40 +0200 Received: from hector.lesours (ours.starynkevitch.net [213.41.130.15]) by mallaury.noc.nerim.net (Postfix) with ESMTP id 4938C62F04; Wed, 14 Apr 2004 19:07:38 +0200 (CEST) Received: from basile by hector.lesours with local (Exim 4.31) id 1BDnrP-0005g3-M9; Wed, 14 Apr 2004 19:07:39 +0200 Date: Wed, 14 Apr 2004 19:07:39 +0200 To: Erol Akarsu , caml-list@inria.fr Subject: Re: [Caml-list] Real Time Ocaml Message-ID: <20040414170739.GA21643@ours.starynkevitch.net> References: <20040414161227.14830.qmail@web12404.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040414161227.14830.qmail@web12404.mail.yahoo.com> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Basile STARYNKEVITCH X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 basile:01 basile:01 2004:99 ocamlc:01 ocamlopt:01 advi:01 runtime:01 bounded:01 bounded:01 milliseconds:01 compacting:01 runtime:01 doable:01 malloc:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 340 On Wed, Apr 14, 2004 at 09:12:27AM -0700, Erol Akarsu wrote: > I am evaluating Ocaml for the implementation language > to build Semantic Web-based services. > > I would like to run the required Ocaml application on > a Real Time Operating System. You did not define what you call a real-time OS. Given your objectives, I guess it does not mean hard real time system. > I think Ocaml generates an intermediate C code and compile it into > binary code or maybe directly into binary one. No. Ocaml comes in two flavors: a compiler "ocamlc" generating bytecode (not JVM bytecode, but Ocaml bytecode) for a specific VM designed for Ocaml. Thr VM is a fast bytecode interpreter coded in C (I am coding is an experimental, unsopported, JIT version of it - see my home page at INRIA on http://cristal.inria.fr/~bstarynk - this JIT translator uses GNU lightning and is still a little buggy - beta stage). a compiler "ocamlopt" generating machine code (via assembler, like most C or C++ compilers do) for several architectures and systems. > We have so many real time OSs that support C language. > In this case, I don't know Ocaml can compile on Real > time OS. This issue is very critical for the project. > Have we tried to run Ocaml application on any real > time os? Several Ocaml applications are very interactive (e.g. advi... and some servers). But since you did not define what you mean by real time, it is hard to guess what exactly are your needs. Some points (but other collegues could give more details) 1. The OCaml runtime, in particular its garbage collector, is not real time (in the sense, for example, of being able to react thru Ocaml code to external events in a stricty bounded & controlled manner). However, it can be suited to react in small bounded time e.g. less that 100 milliseconds [and perhaps even much less, I don't know exactly] on today's >1GHz x86 processors in most of the cases. However, on some occasion, a full compacting garbage collection is triggered, which may need some significant delay (depending upon your memory consumption). 2. The garbage collector can be tuned for good interactive performance. See the Gc module for details, and look into the mailing list archives for more. 3. Porting the core of Ocaml runtime to non-Posix realtime systems should be doable (I believe some people did it, ...) but requires a significant amount of work. In a few words, you did not define what you mean by real-time system; Ocaml is not really real-time, but suitable for interactive programs (with some tuning of its GC). I think that Ocaml could be used for servers, including Web servers. Please note that even standard C is not real-time: there is no real-time guarantee (or even specification) of the behavior of essential C library functions like malloc or fprintf. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet aliases: basiletunesorg = bstarynknerimnet 8, rue de la Faïencerie, 92340 Bourg La Reine, France ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners