[gclist] memory allocation for periodic task of real-time
Fri, 22 Dec 2000 10:46:39 +0100
Dear Okehee Goh,
>I don't know my question is proper to this mailing list.
>If not, I apologize.
>I need to devise periodic task model( of real-time application) using JAVA
>for simulation about
> memory allocation/garbage collection.
>What I am wondering is if real-time application that is designed for
>periodic task and is written in Object-oriented language like Java or C++
>has some significant or unique pattern in terms of memory allocation
>For example, are there these kinds of rules like memory allocation happens
>at the specific point of execution of task?
Well, dynamic memory management in most systems is not implemented such
that real-time guarantees on an allocation could be given. The reasons are
that allocations might take arbitrarily long due to searching of the free
lists for a suitably sized free block or due to the garbage collection work
that would be needed in a garbage collected environment. Other difficulties
are memory fragmentation and conservative pointer identification, this
makes dynamic allocation too unpredictable for most real-time systems.
Nevertheless, these difficulties can be overcome (we are working on a
real-time Java implementation that actually gives the guarantees required
to perform allocations in real-time tasks).
So, the most common allocation patter you find in real-time tasks is very
simple: There is no dynamic allocation in the real-time task. Instead, the
required memory is typically allocated at system startup only.
>From "Memory System Behavior of Java Programs: Methodology and Analysis" by
> Kim and Yarsun Hsu, I found some data about lifetime and size
>characteristics of memory objects of SpecJVM98 application. I'd like to know
>these data can be applied to real-time application examples.
I would not expect so, provided that the most common pattern is allocation
only at system startup time, the lifetime of objects will be very long. I
would expect a larger average allocation size in typical real-time systems
due to the less frequent use of small objects, but I do not know if there
is any data available.
Fridtjof Siebert E-Mail: firstname.lastname@example.org
Jamaica Systems Phone: office +49/721/78 18 611
Oberfeldstr. 34B university +49/721/60 87 358
76149 Karlsruhe, Germany Home: http://www.jamaica-systems.de/