On Sat, 18 Mar 2000, Alain [iso-8859-1] Rollé wrote:
> fault. The time required to bring the referenced data into physical memory from
> disk can cause a real-time application to lose its determinism. The Solaris
> Operating Environment addresses this problem by allowing the locking of a
> process' pages into memory using mlock(3C) or mlockall(3C).
These functions are also available for user space processes in Linux. In
fact, they are recommended if you want to use soft real time featues of
standard Linux.
> If I understand well, this problem does not occur in RTL because virtual memory
> is not a feature which is supported by the Real Time kernel. This makes me
> wonder, however, how the RT kernel obtains memory for the real time tasks. Is
> it a fixed partition of memory that never gets swapped out ? How does it work ?
The memory in RT and non-RT Linux kernel is the same. For small allocations,
kmalloc is used, physical memory is allocated (but is accessed through
virtual adress, different from the physical address). For bigger allocations
vmalloc() is used, this gets a list of free blocks, and remaps them so they
look continuous. All kinds of memory allocated for kernel use are not
swappable of course. But it is not a fixed partition, everything is
dynamically resized, including disk cache etc. For tasks executing in
hard real time, this means when the kernel proper may have interrupts
disabled situation is more complicated - they can not allocate memory using
standard Linux kernel calls (hard real time tasks can preempt critical
regions of Linux kernel code). Memory used in ISR and periodic tasks should
be preallocated.
> To avoid jitter, the Solaris Operating Environment provides for early binding
> of dynamic libraries. By setting the LD_BIND_NOW environment variable to "1",
> libraries are bound at application startup time.
> I presume the same technique is used in RTLinux ? If not, how is it done ?
No need for it. The library consists of other (standard) RT modules you load
before your module. It is not possible to defer the binding. This is all
kernel space.
Best regards,
--
Tomek
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/