Re: non filesystem (was Re: Serial Port access from kernel)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 26, 2001 at 12:19:32PM -0500, Javier Guerra wrote:
> >Nonsense. If you're doing without a filesystem, you can't do userland
> >_at all_.
> 
> it might be nonsense (in most cases) to do everything in kernelspace, 
> but that wasn't what i'd like.  it's not hard to imagine a kernel 
> that creates proceses out of ROM, or the network, or a serial port; 

It actually is quite hard to imagine. How would you like to load those
processes from the network? Tftp is policy, so it belongs to userland.
Same goes for serial port: zmodem is policy. BTW, the easiest way to
create processes out of a ROM is to have a filesystem on that ROM
(cramfs, JFFS2): no special tricks needed, runs out of the box.

I know that a lot of kernel initialisation policy is currently still
done in the kernel (bootp, NFS root, ACPI, etc.), but one of the most
interesting new things happening right now in linux-2.5 is that a lot
of the initialisation stuff is moved to userland. The kernel image will
contain a cpio image of the rootfs that contains a couple of binaries
that will do things like ACPI table parsing, bootp protocol, NFS root,
ask the user for the ramdisk floppy, etc. Why all this? Because we want
to get rid of the policy in the kernel, and we can get rid of a lot of
special casing and other crap in the kernel code.

> and these processes could ran in userland, and talk to each other via 
> IPC

Guess what... IPC needs a filesystem as well (see
Documentation/filesystems/tmpfs.txt).

> but in UNIX, the mantra "everything is a file" presupones a 
> filesystem.  

I wouldn't call it a mantra, it's more like one of the UNIX design
philosophies. But yes, a UNIX kernel needs a filesystem to do something
useful at all.

> in QNX, "everything is a message" doesn't.

You're comparing apples with polar bears. As a micro kernel, QNX uses
message passing to let the separate subsystems within the kernel
communicate with each other (Linux uses direct function calls). What we
were discussing is how a UNIX-like operating system (and a micro kernel
can behave like that, see Minix and GNU HURD) could work at all without
a filesystem for userland processes.

> you can see a working example, the PalmPilot doesn't have a filesystem!

PalmOS somehow has to index the contents of the RAM (programs and user
records). It might be hidden to the user, but that index actually is a
filesystem.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands  Phone: +31-15-2783635
Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux