Mon, 30 Oct 2000 Erwin Rol wrote:
[...]
> I do have some questions related to memory allocation. Namely when using
> linux threads in userspace with a RT_TASK buddy, you have to lock memory
> so it won't be swapped out, i understand that and have done that with
> normal pthreads too. But what if the stack grows and the linux kernel
> needs an extra page for that grown stack and needs to get it from swap ?
> Or is when the userspace task is made realtime the RT_TASK's stack that
> is used ?
Common problem across most RT environtments. We have the same problem with
Linux/lowlatency, and of course, there are somewhat related problems with RTL
and RTAI; if you overflow the stack, you're in serious trouble... The latter
two will crash if this happens, while most user space solutions will risk
missing deadlines.
The solution for both problems is the usual one for hard RT programming;
allocate as much stack space as you could possibly need, and then add a
sensible amount of headroom, just in case you've miscalculated something.
After all, the stack is just memory, and in RT systems you need to make sure
you have enough of it readily available at all times.
David Olofson
Programmer
Reologica Instruments AB
[EMAIL PROTECTED]
..- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
..- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> [EMAIL PROTECTED] -'
-- [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/