Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!f.gp.cs.cmu.edu!mjw From: mjw@f.gp.cs.cmu.edu (Michael Witbrock) Newsgroups: comp.sys.amiga Subject: Shells. Message-ID: <50@f.gp.cs.cmu.edu> Date: Tue, 21-Apr-87 23:27:18 EST Article-I.D.: f.50 Posted: Tue Apr 21 23:27:18 1987 Date-Received: Thu, 23-Apr-87 03:48:24 EST Reply-To: mjw@f.gp.cs.cmu.edu (Michael Witbrock) Organization: Carnegie-Mellon University, CS/RI Lines: 85 Keywords: Lately I have been thinking about ways to speed up the CLI. An extensible command set is great in theory, but is rather slow in practice. Two ways of dealing with this are evident: 1) Load the 'important' parts of C: onto ram: at startup, and put ram: at the beginning of the path. 2) Write a shell with (some) built in commands. There is a third, more general possibility: command caching. This would require replacing the CLI with a (very primitive) shell type program. This program, when given a command to execute, would look for it on ram: ( a virtually instantaneous operation ), and if it's there, run it from there. If not in ram, copy it there and run it. This should mean that uncached commands run about as slowly as they do now (i.e. very, but it's no loss), and cached ones at from-ram speed. Obviously, when the 'shell' was started up, it coould take params like, max ram: space to use, Max size command to cache etc. Care would have to be taken in designing the cache replacement strategy (LRU, FIFO, use counts etc etc). This scheme has the advantage over scheme 1) above in that it doesn't 'waste' ram: with unused commands, nor does it wast time loading them. It has the advantage over 2) in that it can make 'resident' the commands that the user, not the shell designer uses most often. There is, of course, the problem of telling when c: has been written to. (i.e. cache consistency) The only way I can see is to try to tell from the commands, and then do a time stamp comparison. This wouldn't catch everything, but in most cases, people aren't regularly changing the built in commands. ---- This is not meant in any way to be an attack on any of the shells people have written. These are wonderful tools. I use one of them all the time (and more often when I get a bit more memory). command line editing is not just a nice thing to have, it is an essential preventative for insanity (HINT for 1.3 or 2.0 or whatever :-]). These shells may, however provide more than the average amiga-dos CLI user needs. In any case, caching frequently used non-built in commands might improve on the current shells. (e.g. caching cc on a machine with lots of memory [I know, I know it's not in c: ...] Well? hows about it? -- ==================================================================== Michael.Witbrock@f.gp.cs.cmu.edu US Mail: Michael Witbrock Dept of Computer Science Carnegie Mellon University Pittsburgh PA 15213-6890 USA Telephone : (412) 268 3621 [Office] (412) 681 3806 [Home] ======================================================== "Be good, be kind, in whatever you say and do, and remember: keep cool till after school." (Ollie Olsen, Television New Zealand Kids Programme host [Translated from sign language] ). -- ==================================================================== Michael.Witbrock@f.gp.cs.cmu.edu US Mail: Michael Witbrock Dept of Computer Science Carnegie Mellon University Pittsburgh PA 15213-6890 USA Telephone : (412) 268 3621 [Office] (412) 681 3806 [Home] ======================================================== "Be good, be kind, in whatever you say and do, and remember: keep cool till after school." (Ollie Olsen, Television New Zealand Kids Programme host [Translated from sign language] ).