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 CAA21302; Tue, 20 Apr 2004 02:16:14 +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 CAA21284; Tue, 20 Apr 2004 02:16:13 +0200 (MET DST) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3K0GBYM021901; Tue, 20 Apr 2004 02:16:12 +0200 Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.11.6/8.10.1) with ESMTP id i3K0G4Q04587; Mon, 19 Apr 2004 19:16:07 -0500 (CDT) Date: Mon, 19 Apr 2004 19:20:38 -0500 (CDT) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Basile Starynkevitch cc: Ocaml Mailing List Subject: Re: [Caml-list] Real Time Ocaml In-Reply-To: <20040416075542.GA1500@bourg.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 runtime:01 doable:01 slower:01 barrier:01 ocamlopt:01 slower:01 allocations:01 ocaml:01 ocaml:01 garbage:01 garbage:01 bytecode:01 native:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 16 Apr 2004, Basile Starynkevitch wrote: > I do not think that re-coding the Ocaml runtime system for hard > real-time performance is really realistic (it is doable, but it is a > big task, requiring significant expertise), and I suspect that the > resulting system would be slower than today's Ocaml, and will perform > worse. Real-time garbage collection is tricky and costly (perhaps even > needing some kind of read barrier). If you recode the Ocaml GC, you > either have to recode the bytecode interpreter or heavily change some > tricky parts of the ocamlopt native code generator. > First off, having worked in the realtime world, realtime does not mean fast. Quite the contrary, often. What realtime means is that I can set deadlines, that a certain amount of work needs to be done within a given time, and can test and prove that the work will, indeed, be done. Soft realtime generally means that missing a deadline, while bad, is not catastrophic. Examples include music and video recording/playback. Missing a deadline means a skip. Hard realtime means that there are catastrophic consequences for missing a deadline- generally, lawyers get involved if you miss the deadline. An example here is the brake controller on your car. Slower isn't the problem, so long as it's a constant slower. It's large differences in time between "common case" and "worst case". The only thing non-realtime in Ocaml is the garbage collection. There are realtime garbage collectors, which do a certain amount of work every allocation, so that a) the cost of every allocation is constant (or close enough), and b) that all the work the collector ever needs to do is distributed evenly among the allocations. The current collector, while perfect for non-realtime tasks (due to it's small average cost) is horrible for realtime because of the huge difference between the common case (5 instructions) and the worst case (mass collection)> -- "Usenet is like a herd of performing elephants with diarrhea -- massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it." - Gene Spafford Brian ------------------- 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