Disgusting Kernel Hack

donn at sdchema.UUCP donn at sdchema.UUCP
Wed Feb 29 19:10:05 AEST 1984


Nigel Horne (ukc!root44!njh) says, with some degree of sarcasm:

	But I don't always want to have to type Return all the time,
	and I also think that the kernel recognising \b as a special
	character is a disgusting hack. If we are supposed to use |more
	rather than leaving the 60's idea of a teletype driver(!!!!!)
	then why not also have some PROGRAM which recognises
	^H,^C,^Z,^S,^Q etc.

Actually this is not as bad an idea as it sounds.  Nigel intends that
it should appear ridiculous, but in fact I think this is close to what
is meant by 'stackable line disciplines' or 'stream (coroutine) I/O'.

The basic interface to the system might be a simple byte stream,
sufficient for networking programs; on top of that a user could put a
module that interpreted special characters a la V7, and on top of that
a module that worked like the Berkeley new tty driver, and on top of
that a module that did CRT paging.  You could go even further and put a
virtual terminal on top; rip out all the user code dealing with
terminal idiosyncracies and have programs communicate with a module
which knows all there is to know about a particular terminal and does
screen (bitmap?) manipulation just the way you want it.  Instead of
pasting a '|more' onto commands, you push another I/O module onto your
stack.  Pseudo-ttys would be easy -- attach a module that attaches to
an IPC port.

The main issue with this approach is probably speed.  What might be a
good way to put the elements together so that the overhead is low?  More
issues: these I/O processing units could live either inside or outside
the kernel; inside the kernel means no paging and fast access to needed
kernel privileges, but sometimes one might want the code to be paged
and moreover it might be nice to let users write their own modules and
attach them without needing kernel privileges.

Dream on,

Donn Seeley    UCSD Chemistry Dept.       ucbvax!sdcsvax!sdchema!donn
32 52' 30"N 117 14' 25"W  (619) 452-4016  sdcsvax!sdchema!donn at noscvax



More information about the Comp.unix.wizards mailing list