[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[rtl] Shared Memory
Something that might interest those who use shared memory between RT
tasks and regular processes. Attached is a patch that I have created
that allows the sharing of memory between kernel and user space with
a little more control than just removing the current block on the
kernel memory. It allows a kernel module to allocate memory that will
be sharable with user processes. The user processes have a new system
call "shm_open" which partially mimics the POSIX shared memory (for
user processes) ie it returns a fd which can be used with mmap to map
into the users address space.
I've had limited success with this so far, but it will only work for
2.0.xx kernels. When I get time I might have a look at the mm for
newer kernels. The patch attached to this mail was made against
2.0.27 kernel after the RT patch was made. So if your interested try
it out, but be careful it probably still needs considerable work yet.
Another thing I have been toying with was using shared memory to
control the RT tasks from the user process. Instead of using a fifo
to pass control messages to a handler in the module. If the RT task
structures are placed in shared memory then tasks states can be
modified. Of course this means that a system call has to be made for
a reschedule so that the RT scheduler can be told when any RT tasks
need to be rechecked. Prehaps this could be investigated further, but
I think that added a reschedule system call should cause to many
problems and can still be flexible enought to cope with different
scheduler modules.
Anyway though this might interest a few people.
Regards,
Ian Ridley
mailto:iridley@ingenico.com.au
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: shmem.tgz
Date: 23 Apr 1998, 9:46
Size: 8373 bytes.
Type: Unknown
shmem.tgz