[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Could kernel copy memory between processes directly?
>>Urgh. Too much to read. I have to try to catch up with work first.
>Oops, sorry. I'd explain it in a few lines, but it's dangerous.
"Danger! Will Robinson! Danger!"
Piece of Code "A", is required to get information from:
Piece of Code "B". "A" does something, and then wishes to send it to:
>>"Procedure call into another process"? Sounds like Solaris doors. If you
>>want to implement something like that doors would be a very good thing.
>Correct! Very similar although there are differences, most importantly QNX
>sends someting like iovector while doors send a linear buffer, I guess. I
>don't think I could implement doors myself but NetBSD said (will say?) at
>Usenix 2002 it was their "future direction". Basic QNX api looks much
>simpler and maybe reachable for me (with a little help from my friends :-).
Er, IPC is different from shared memory in QNX because it sends the data in
a package rather then leaving it quivering on the dining room table. IPC is
used to abstract shared data from sticky-fingers.
IPC, and shared memory in Unix /Linux are the same premise, but done
>I don't know how doors vs. qnx performs, but direct copying is a key to
>good performance in both cases. This is why I wanted to know if such a
>direct copy from one process to another is possible at all.
Hmm, Copying of Memory --> Not exactly IPC is this?
>>copyin and copyout only work on the currently running process.
>Okay, this is the answer to my initial question. So, as a simplification,
>the kernel sees only itself and current process, like in Linux, correct?
OK, Unix/Linux/Lynx/Vx type of kernels and IPC VS. QNX / MACH
This is an "executive" matter or in Intel-Speak what operates in Ring-0.
Unices and Linices doing IPC do so via a network conduit, or a STREAM
conduit of some sort handled by the kernel.
QNX and MACH do part of that, but leave the filesystem(STREAM) signalling up
to an external module and provide short-path context manipulation as a
service to achieve real-time pre-emption so that other things that need to
go "Bing.", can and shall.
Shared memory is done through a POSIX compliant API like mmap and sysvshm
type of API's. Doors could be done too, but then again, its doors.. QNX and
Unixes and Linux are similar. Closer to what you want, but a little too
close to NOT be considered joined-at-the-hip type of code you wish to make.
IPC and Shared Memory:
QNX only implements the following two items in Kernel-Space:
All others are in User-Space (Ring-3)
In Unix/Linux kernels these exist there too along with:
Shared-memory :: MMU or Software address verify/exception mgmt.
Pipes. (Hmm, can't explicitly say Ring-0 because this is programmer/Compiler
So this begs the question: Why the double-buffer? And two different
Chat with friends online, try MSN Messenger: http://messenger.msn.com