[<<][c][>>][..]Thu Jan 29 09:27:42 CET 2009
memory management + RT
- RT datastructures (directed acyclic graphs)
This means eliminating malloc(). How far can we get with DAGs? With
downward closures and read-only structures all data is stored in the
tasks's activation frame. This means DAG memory management without
- traversal and partial continuations
In the face of lightweight tasks (i.e. stack machines), partial
contuations (tasks) become a feasible abstraction. Figure out if
there are "free rides". I.e. if this can lead to datastructures that
would otherwise require special memory management (refcounts) but can
be built on top of stack-based allocators.
One remark though: this requires one (arbitrarily large) stack per
task, so just moves the problem. The problem being that _real_ memory
comes from a shared pool - a machine architecture problem.
So.. Can we solve this problem with virtual memory? Or is VM exactly
the thing that makes context switches expensive?
To summarize the idea:
ASSUMPTION: Downward closures are 'powerful enough' for building
data structures in simple RT programming.
ADVANTAGE: Use fast stack-based memory management.
PROBLEM: One stack per task. How to allocate this from a
single memory pool?
It is a non-issue for non-shared memory, but that might require
inefficient pre-allocation. Where is the trade-off exactly?