lkml.org 
[lkml]   [1997]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectStarting an application from the kernel II: the revenge
Date
On Fri, 25 Apr 1997, I wrote:

> Is there a way to start an application from the kernel?
> I think kerneld allows that but it does'nt let me see
> the application's output...

I got a few replies which didn't really help me so I guess I have to tell a
few words on what I'm trying to do.

As part of my final year project I designed a replicated network file system
(I call it RNFS). It uses NFS so that the servers don't have to be
rewritten, only the client-side which has to be integrated in the linux
kernel as a new filesystem type.

I'm now implementing a prototype of RNFS. The way it works is that it
creates an additional layer between the VFS and the NFS-specific code (it
can be any fs type actually) with the replication management functionnality.
The remote NFS servers actually have to be mounted normally first. I then
manipulates the "local" inodes.

My design uses replication data (timestamps, directories, locks, etc.) which
are saved on every remote server. The problem is that the stantard library
is of course not available from kernel. Moreover, the filesytem-specific
functions expect pointers to buffers located in the user-space which I
cannot provide from the kernel. For example, when the VFS calls the RNFS
open() function, I want to write a new timestamp in a special-purpose file
on the NFS server. For this, I call the NFS write() function, which expects
a buffer in user-space!!!

So I thought I could avoid the problem by executing some purpose-built
programs from the kernel (from the RNFS functions in the kernel) whenever
necessary. Sort of micro-kernel design, isn't it?

Here are my comments on some of the replies I got:

> Its not a very good idea nor in general does it make sense but you can
> do it. Read init/main.c - it runs init from the kernel

Did it. Read it. Got even more confused!


> kerneld is started by /etc/rc.sysinit (on redhat at least).
> Simply put the application in rc.sysinit.

It's not what I want to do. I want to be able to run my application anytime,
not just once.


> Don't do it. If You need it -- think twice. I'm sure Yours design IS
> broken

Well, as I don't have much time left I thought it was a good idea but if you
have any suggestion...


Olivier Elshocht
oelshoch@ulb.ac.be

\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.039 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site