Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] The Bytecode Interpreter...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] The Bytecode Interpreter...
On Sat, 2005-10-29 at 13:29 +0200, Gerd Stolpmann wrote:

> > Also, would it be safe to build an ISR framework
> > that could wake up a thread waiting on an interrupt to be triggered?
> 
> The problem is you need realtime behaviour. That means your ISR thread
> must have a higher priority than other threads, i.e. you need a
> realtime-aware scheduler.
> 
> Second, also memory management must be realtime-aware. This is the
> difficult part. How to handle the case when the interrupt occurs within
> a GC cycle?

The easy way of course: forget about it :)

ISR code only allocates memory on the stack, and it only
accesses its local stack and global variables. All the
real work is done by the kernel, not in the ISRs .. and the
kernel is a single synchronous thread.

Your main problem, IMHO, will be concurrency, not interrupts.
That is -- multiprocessor support. Because typical 
multiprocessor OS shares a lot more data between CPUs,
and runs at least part of the kernel on ALL the CPUs.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net