Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Fortune) 6/7/84; site dmsd.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!hpda!dmsd!bass From: bass@dmsd.UUCP (John Bass) Newsgroups: net.arch Subject: Re: dumber terminal device drivers Message-ID: <191@dmsd.UUCP> Date: Tue, 9-Apr-85 04:14:42 EST Article-I.D.: dmsd.191 Posted: Tue Apr 9 04:14:42 1985 Date-Received: Thu, 11-Apr-85 00:35:45 EST References: <327@piggy.UUCP> <2536@nsc.UUCP>, <209@osiris.UUCP> <528@hou2d.UUCP> Lines: 41 As noted by others is that the real killer is the tty system call times -- as there are atleast TWO such calls -- one read and one write to echo the char. The reason the echo is done in most applications is that they require sending cursor position and control information which MUST NOT have echoed input interleaved into it. Thus on most mini & micro unix systems this consumes about 7-15ms per keystroke including user time, system calls, and context switch. In most user interfaces the REAL KILLER is that the user interface suffers keystroke echo latencys of up to several seconds depending on the jobs relative priority at the time and the amount of paging/swapping that occurs. These LONG echo times occur on most machines under light load when ABUNDANT memory is not available -- several times what is needed under a better user interface. For most commercial systems this makes even the fastest systems appear doggy at times when compared to dedicated micros like the IBM PC. The best solution for multiuser systems is to EXPAND the keyboard input function to include a break bitmap and an echo bit map -- plus extend the terminal interface to include a 1D line editor with left-right margin control and max window size - this is a minor change to V7 tty routines and is backward compatable with V7 line sematics. A Special IOCTL to tty is added to read/write the editor params and another IOCTL to preset the cannon buffer. The net effect is a HOT KEYBOARD user interface that is line oriented and takes the guts of keyboard handling in most data editor user interfaced and makes it REALTIME at the users terminal. Since the number of system calls and context switches are reduced the system handles heavy loads better and still provides dedicated system type response times. IT IS VERY IMPORTANT not to get carried away with too much functionality since this MUST be done at input interrrupt time -- you cann't afford to do a wakeup/context switch. Several V6 exeriments in the late 70's died due to getting too fanncy -- they tried doing complete window management at a very severe performance cost for non-window applications. I have code and a document presenting this approach. It comes from work done over the last 8 years on various unix systems. I raised this issue as an item for the /usr/group/standards committee but have sat the proposal waiting for the IEEE change over to settle out. John Bass