[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] System load

From: Felix Winkelmann
Subject: Re: [Chicken-users] System load
Date: Thu, 16 Jan 2003 14:59:54 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530

Joerg F. Wittenberger wrote:

Unfortunately I need more information about the virtual machine
chicken implements.  Could we have an overview please.

What do these things, are they compiled into native Code?
##sys#setslot   (I guess I know)

Sets the value of slot inside a block of data.

##sys#setislot  (I have no idea)

The same as ##sys#setslot, but assumes the value is immediate
(so we don't have to remember the assignment for generational
GC). Immediate values are chars, booleans, fixnums, null and eof.

The heavy use of ##sys#slot et. al. poses a problem to me: I can't
read the source in a reasonable time.  Are there any reasons (besides
lazyness ;-) not to use define-constant (or or a macro or what ever is
replaced by chicken with a slot number; which type of definition
should I use here)?

A macro is probably best.

I've been told, that allocations would be cheap with chicken, but I
guess at least in the ##sys#schedule it's worth to save them.

I doubt that this is the reason for the disappointing performance.
I'm quite sure this is more an I/O-subsystem problem...

The ##sys#ready-queue-* is a misnomer, it's somehow the whole thread

Yes, the name is not really perfect. It contains ready threads and
blocked ones (which are waiting for timeouts). Suspended threads are
not in it. (##sys#all-threads) doesn't return suspended threads.

Can I have a ready queue, which is just that, i.e, a test
(null? ##sys#ready-queue) => #t would mean 'the current thread is the
only one ready to run'.  I need a constant time predicate here for
proper handling of select(2).

I guess this is the right moment to overhaul the scheduler...
But that needs care. What we need is a more efficient representation
for ready and blocked threads. Currently there is only a single
queue that contains all threads which are ready or blocked.
A blocked thread has a thunk that is invoked and which should
return #t, if the thread should be unblocked.

Crude? Probably. Any ideas would be welcome.

Is there other code, which I would break, if I would go to change a
few things.  Please drop me a note, what I want to look at.

Sure, many things. ;-)
Just mail me what you want to change, and I'll take a look.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]