Human vs. machine input (was: Re: Behaviour of setjmp/longjmp ...)

Guy Harris guy at auspex.UUCP
Thu Feb 16 18:45:20 AEST 1989


>>Right.  So all OSes that don't let you do that are "fairly useless". 
>>Funny, lots of people seem to have uses for them....
>
>Yes, to run monolithic applications.  Unix could do that too, I suppose..

What is a "monolithic application"? "vi", "emacs", or any one of N
screen editors? UNIX not only *can* do that, but *does* do it, quite
often; if it *couldn't* run such an editor, I'd be pretty ticked off. 

>How do you write programs to manipulate the stuff, then?  As a programmer,
>I prefer to *eliminate* human input rather than optimizing it.  Obviously
>I don't do freehand graphics.

Some people do.  Some people also edit text.  If you've got software to
write code and documents for me, without my input, I'd love to have it,
as long as I find its output acceptable; otherwise, there are plenty of
situations where you won't be able to eliminate human input. 

Yes, it's *nice* to be able to glue programs together.  The existence of
many operating systems that, unfortunately, don't let you do that as
conveniently as UNIX, but that people can still use, however
inconveniently, to get their job done proves that such OSes are not
"fairly useless", however.

>Try executing sar on a '386 machine running VP/ix with a DOS process
>active.  Note that the idle time is 0.  Perhaps keyboard scanning is
>not entirely to blame - does the Sun 386i handle DOS better?

Beats me.  I know how the Sun keyboard works, though, and there's no
"scanning" necessary.  You press a key, and it sends a "this key went
down" code over the serial port; release the key, and it sends a "this
key went up" code over the port.  No muss, no fuss, and no CPU cycles
spent polling the keyboard.  (The parallel-port keyboard on REALLY old
Suns may have had to be polled - I've forgotten how it works - but such
polling was relatively cheap.) I suspect a lot of other workstations'
keyboards work much the same way. 

It may also be that the DOS process is doing the scanning, and VP/ix is
running around like a headless chicken simulating the keyboard.  There
are a lot of things you can get away with on a single-tasking OS, such
as polling your keyboard in a loop, that don't work quite so nicely on a
multi-tasking OS.



More information about the Comp.unix.wizards mailing list