Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Human vs. machine input (was: Re: Behaviour of setjmp/longjmp ...) Message-ID: <1023@auspex.UUCP> Date: 16 Feb 89 08:45:20 GMT References: <25@torsqnt.UUCP> <225800127@uxe.cso.uiuc.edu> <7697@chinet.chi.il.us> <1016@auspex.UUCP> <7709@chinet.chi.il.us> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 42 >>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.