[clean-list] support for OpenGl
Maks Verver
m.verver@student.utwente.nl
Mon, 08 Jul 2002 14:33:00 +0200
Hi
At 12:32 5-7-2002 -0400, you wrote:
>1. can you tell me more about concurrency control?
The nice thing about a side effect free language, is that no concurrency
control in the source code is needed whatsoever (although hints might be
useful). The compiler (or the run time environment, for that matter) can
positively decide which parts of the code are independent and can thus be
run concurrently (on seperate processors, for example). In computational
environments (academic work on a multiprocessor supercomputer, for example)
or applications executing on a (possible dedicated) multi-programmed
operating system (like any modern operating system, really) this means more
effective usage of resources.
I believe that when I first heard about Clean, it was still known as
Concurrent Clean, due to some concurrency control mechanism. I have never
read anything specific about this, though, and I believe it is no longer
available in the current version of Clean. I think others (and especially
the developers) may tell you more about this.
>2. does a constant-time functional queue implementation exist?
For a bounded queue (ie. a queue with some at run-time determined maximum
number of items) a simple and (time) efficient implementation using a tuple
containing an array of items and the number of items would suffice.
Ofcourse, this would make the queue a unique datastructure, but this is
usually not a problem. If it is, it can be copied in linear time.
In some situations (if the maximum and average size of a queue differ
greatly), choosing a fixed bound is not acceptable because of the overhead
in initialization and memory usage, and some other implementation is
needed. I must admit that I can't think of a suitable implementation for
the general case. Maybe someone else can answer this question?
Kind regards,
Maks Verver.