tty and more

From: Lars Pensjo <lars_at_nospam.org>
Date: Fri May 06 1994 - 18:36:47 PDT

I have looked a little at the way the tty is handled, and have some questions.
I haven't looked very thorough, so please be patient with misunderstandings.

It seems a lot of input and output processing is handled by libc instead of
a driver. Is this a temporary solution, or the way it is supposed to be ?
There will be problems, like no echo when typing characters ahead.

I like the SYSV model, using STREAMS. The idea is to have a "basic" device
driver, which only does the hardware communication. On this driver, you
push another protocol which implements other things. In the tty case, the
pushed handler would take care of CR-NL mapping, echo, erasing characters etc.

This model seems to be close to the way VSTa is working, or could be working.
The filesystem for example, consists of a low level hardware device driver,
with a filesystem manager "pushed" onto it. Communication is done through
messages.

Another benefit of having a special server taking care of input and output
processing, is that it can be used elsewhere. For example, when defining
pseudo ttys. A pseudo tty could maybe simply be created by pushing such a
handler on a pipe ?

The Gnu readline functionality could be implemented as a server to be pushed
onto a tty, instead of building it into the shell or libc.

The STREAMS mechanism in SYSV is very fast. Would a similar mechanism based
on messages involve too much overhead ?

Now to another thing: The kernel is small and nice, as it only has a limited
number of responsibilities. Among these are process management and memory
management. It seems there are no general ways to access these
informations. Implementing a 'ps' program would need some kind of access.
Of course, implementing 'ps' using a /proc filesystem is even better, but that
driver will need the kernel information access instead.

It seems the kerner doesn't accept any messages by itself. I don't very much
like the old unix idea of a /dev/kmem. It is flexible, not a pretty
solution.

Is there maybe a more general solution ?

Yet another discussion: some people wants automatic backups of files, with
maybe a whole series with version number like VMS. Could this be implemented
through a server that is pushed onto another file system ?

----
Lars Pensj|
lars@distinct.se
Received on Fri May 6 16:53:32 1994

This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 21:04:28 PDT